ImageEn, unit iexBitmaps

TIEMultiBitmap.Params

TIEMultiBitmap.Params

Declaration

property Params[Index: Integer]: TIOParams;

Description

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

Note:
If ParamsEnabled is False, Params are not updated when assigning or appending
To propagate 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.LoadFromFile( 'C:\MyImage.tiff' );
MBitmap.Params[ 0 ].TIFF_Compression := ioTIFF_G4Fax;
MBitmap.DuplicateCompressionInfo();
MBitmap.SaveToFile( 'C:\OutImage.tiff' );
MBitmap.Free();

// Which is the same as:
MBitmap := TIEMultiBitmap.Create();
MParams := TIOMultiParams.Create();
MBitmap.LoadFromFile( 'C:\MyImage.tiff', MParams );
for i := 0 to MBitmap.Count do
  MParams[i].TIFF_Compression := ioTIFF_G4Fax;
MBitmap.SaveToFile( '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.LoadFromFile('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;      // or ioPDF_G4Fax for monochrome images
  mbmp.Params[i].JPEG_Quality    := 90;
end;
IEGlobalSettings().PDFEngine := ieenNative;          // For compression support
mbmp.SaveToFile('D:\Output.pdf');
mbmp.Free();

See Also

ParamsEnabled
DuplicateCompressionInfo