ImageEn, unit imageenio

TImageEnIO.LoadFromStreamPCX

TImageEnIO.LoadFromStreamPCX

Declaration

function LoadFromStreamPCX(Stream: TStream): Boolean;

Description

Loads an image from a stream containing a PCX file. The result will be False if an error is encountered, e.g. the file in the stream is not PCX format (Aborting will be True).

Note:
If StreamHeaders property is True, the stream must have a special header (saved using SaveToStreamPCX)
LoadFromStreamPCX does not reset the position of the stream, so you may need to first call Stream.Position := 0;

Example

// Load a PCX file with LoadFromStreamPCX
var
  fs: TFileStream;
begin
  fs := TFileStream.Create( 'D:\myfile.pcx', fmOpenRead );
  if ImageEnView1.IO.LoadFromStreamPCX( fs ) = False then
    ShowMessage('Not a PCX file!');
  fs.Free();
end;