TImageEnIO.SaveToStreamPCX
Declaration
procedure SaveToStreamPCX(Stream: TStream);
Description
Saves the current image to a stream in PCX format.
Note:
◼PCX only supports Bits-per-pixel (BitsPerSample * SamplesPerPixel) values of 1, 4, 8 or 24.
◼If
StreamHeaders property is True, it adds an additional special header as needed for multi-image streams.
◼To abort while saving set
Aborting to True
Example
// Saves ImageEnView1 and ImageEnView2 attached images in file images.dat
// images.dat isn't loadable with LoadFromFileXXX methods
var
fs: TFileStream;
begin
fs := TFileStream.Create( 'D:\bmpimages.dat', fmCreate );
ImageEnView1.IO.StreamHeaders := True;
ImageEnView1.IO.SaveToStreamPCX( fs );
ImageEnView2.IO.StreamHeaders := True;
ImageEnView2.IO.SaveToStreamPCX( fs );
fs.Free();
end;
// Save a single image to image.pcx
// image.pcx is loadable with LoadFromFileXXX methods
var
fs: TFileStream;
begin
fs := TFileStream.Create( 'D:\image.pcx' );
ImageEnView1.IO.StreamHeaders := False;
ImageEnView1.IO.SaveToStreamPCX( fs );
fs.Free();
end;