ImageEn, unit imageenio

TImageEnIO.LoadFromStreamPSD

TImageEnIO.LoadFromStreamPSD


Declaration

function LoadFromStreamPSD(Stream: TStream): Boolean;


Description

Loads an image from a stream containing an Adobe PSD file. The result will be false if an error is encountered, e.g. the file in the stream is not PSD format (Aborting will be true).

PSD files can contain multiple layers. To load layers separately:

ImageEnView1.IO.Params.PSD_LoadLayers := True;
ImageEnView1.IO.LoadFromStreamPSD(stream);


To load only the merged/flattened image (default method):

ImageEnView1.IO.Params.PSD_LoadLayers := False;
ImageEnView1.IO.LoadFromStreamPSD(stream);


Notes:
- You can abort loading by setting Aborting to true
- LoadFromStreamPSD does not reset the position of the stream, so you may need to first call Stream.Position := 0;
- All layers are loaded as image layers, i.e. text and other type layers will become image layers