Hello,
I have updated from version 9 to 12. Unfortunately, after the update, my code no longer works as desired.
i my case i paint some things to a bitmap and try to save it in 2 different formats.
Unfortunately, when save,
i get the message that there is no valid image in the function CheckHaveValidBitmap.
With Version 9.x ist runs without problems.
OK, i create and use only an TBitmap instead of an IEBitmap.
How can i handle this in version 12?
my Code:
var
myBMP: TImageENIO;
begin
try
myBMP := TImageENIO.Create(self);
myBMP.Bitmap := TBitmap.Create;
myBMP.Bitmap.PixelFormat := pf8bit;
myBMP.Params.JPEG_Quality := 100;
myBMP.Bitmap.Height := 500;
myBMP.Bitmap.Width := 500;
PaintLines(myBMP.Bitmap);
//Crash with Error "Bitmap not valid"
myBMP.SaveToFileJPEG(Temp_Path + Pict_Filenames + '.jpg');
myBMP.SaveToFilePNG(Temp_Path + Pict_Filenames + '.png');
myBMP.Bitmap.Free;
FreeAndNil(myBMP);
end;