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!
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;