Hello,
When saving image with all its layers using the function 'LayersSaveToStream' at times it only saves one single layer which is generally the Current Layer.
This happens randomly so I am not able to built a test case.
I am giving the code snippet below:
try
CompFS := TECLFileStream.Create(SaveDialog1.FileName, fmCreate, 'testcode', eclNone);
except on E: Exception do
ShowMessage('Error while creating File to Save' + #13 + E.Message);
end;
Application.ProcessMessages;
try
CompFS.WriteBuffer(L, SizeOf(L));
CompFS.WriteBuffer(Pointer(Arr)^, L * SizeOf(TItem));
except on E: Exception do
ShowMessage('Error while saving Data @ Stage 1' + #13 + E.Message);
end;
Application.ProcessMessages;
try
Child.ImageEnView1.LayersSaveToStream( CompFS, -1 );
except on E: Exception do
ShowMessage('Error while saving Data @ Stage 2' + #13 + E.Message);
end;
Application.ProcessMessages;
//CompFS.Free;
FreeAndNil(CompFS); //Free the object and set it to NIL/NULL
Application.ProcessMessages;
TIA
Yogi Yang