ImageEn, unit iexBitmaps

TIEMultiBitmap.Params

TIEMultiBitmap.Params


Declaration

property Params[idx: integer]: TIOParams;


Description

Provides access to the TIOParams object for the image idx.
The parameters are updated when loading from files or streams. You can modify these parameters before saving images.

Notes:
- If ParamsEnabled is false, Params are not updated when assigning or appending
- To propogate compression params to all frames of a multi-frame image, use DuplicateCompressionInfo


Examples

// Change the compression method for a TIFF file
MBitmap := TIEMultiBitmap.create;
MBitmap.ParamsEnabled := True;
MBitmap.Read( 'C:\MyImage.tiff' );
MBitmap.Params[ 0 ].TIFF_Compression := ioTIFF_G4FAX;
MBitmap.DuplicateCompressionInfo();
MBitmap.Write( 'C:\OutImage.tiff' );
MBitmap.Free;

// Which is the same as:
MBitmap := TIEMultiBitmap.create;
MParams := TIOMultiParams.create;
MBitmap.Read( 'C:\MyImage.tiff', MParams );
for I := 0 to MBitmap.count do
  MParams[ I ].TIFF_Compression := ioTIFF_G4FAX;
MBitmap.Write( 'C:\OutImage.tiff', MParams );
MParams.free;
MBitmap.Free;

// Convert a TIFF to PDF with "US Letter" paper size
mbmp := TIEMultiBitmap.Create;
mbmp.ParamsEnabled := True;
mbmp.Read('D:\Input.tif');
for I := 0 to mbmp.Count-1 do
begin
  mbmp.Params[ I ].PDF_PaperSize := iepLetter;
  mbmp.Params[ I ].PDF_Compression := ioPDF_Jpeg;
end;
mbmp.Write('D:\Output.pdf');
mbmp.Free;