ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Saved BMP image has defect
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

982 Posts

Posted - Sep 16 2014 :  11:05:00  Show Profile  Reply
Hi! I have a TImage on a form and a TImageEnIO component attached to it. I load a .BMP image from a file (which has nice colors) and make some work with it. After this the picture in the TImage still looks great. Then I save the image to a .BMP file with ImageEnIO.SaveToFile(Image.bmp); (I have also tried ImageEnIO.SaveToFileBMP). But the saved BMP file has ugly lines on it and the colors are destroyed:



I repeat: The image on the form looks great and does not have this defect. When I save to a PNG or any other format then the saved image does NOT have any defect.

Does somebody recognize this pattern or this defect and could give me a hint what is going wrong here? Thank you for your help!

w2m

USA
1990 Posts

Posted - Sep 16 2014 :  11:14:59  Show Profile  Reply
Usually when this occurs the image is not 24 bit, so try setting the picture's bitmap pixelformat to 24 bit after opening it.
Image1.Picture.Bitmap.PixelFormat = pf24bit;



Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

PeterPanino

982 Posts

Posted - Sep 16 2014 :  14:39:50  Show Profile  Reply
Thank you Bill, that was it!!!! This forum is really amazing!!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: