I have tried to do all the things that I can understand and configure or recode to get rid of errors mentioned in the subject line of this post.
I have modified the sample PhotoEn2.
I have set the ImageEn's:
LegacyBitmap := False;
SelectionBase := iesbBitmap;
DoubleBuffer := True;
When I load a multi layer PSD file and try to save it in back in PSD format from ImageEn I get the error message Invalid Pointer Operation Error.
Here is the code snippet I am using
if SaveDialogPSD.Execute then
begin
FlName := SaveDialogPSD.FileName;
Child.ImageEnView1.LockUpdate;
Application.ProcessMessages;
Child.ImageEnView1.EnableAlphaChannel := True;
Child.ImageEnView1.DpiX := 200;
Child.ImageEnView1.DpiY := 200;
Child.ImageEnView1.IO.Params.JPEG_Quality := 100;
Child.ImageEnView1.IO.Params.JPEG_Smooth := 3;
Child.ImageEnView1.IO.Params.JPEG_Progressive := False;
Child.ImageEnView1.IO.Params.JPEG_ColorSpace :=ioJPEG_RGB;
try
Child.ImageEnView1.IO.SaveToFilePSD(FlName);
except on E: Exception do
ShowMessage('Error while Saving Image.' + #13 + E.Message);
end;
Application.ProcessMessages;
ProgressBar1.Position := 0;
Child.Changed := False;
Child.Close;
Child.Free;
When I try to save this same file to the native multi layer file format I keep getting Out of Memory error.
Here is the code that I am using to save
if SaveDialog1.Execute then
begin
Child.ImageEnView1.LayersSaveToFile(SaveDialog1.FileName);
end;
I have also observed when I use above code it takes more time then it takes to save file to PSD format with all layers intact.
I don't know as to what to do about this problems.
Anyone has ever faced this or similar to these problems?
Please guide me to solve this problem as it is a show stopper for us and we are not able to release our software in the market.
With my limited knowledge I feel these are errors are related to memory management.
Thanks in advance.
Yogi Yang