ImageEn, unit iemio

TImageEnMIO.Params

TImageEnMIO.Params


Declaration

property Params[idx: integer]: TIOParams;


Description

Provides access to the TIOParams object for the image idx to modify image parameters (e.g. bits per sample, compression, etc).
The parameters are updated when you load from files or streams. You can modify these parameters before saving images.

Note:
 If this TImageEnMIO is connected to a TImageEnMView which is being filled "on demand", then Params will not be valid until the image is loaded. Either use the OnImageLoaded to delay until the image/params are ready, or force loading by using EnsureImageLoaded
 To propogate compression params to all frames of a multi-frame image, use DuplicateCompressionInfo


Example

// Change the compression type of a TIFF and save it
for i := 0 to ImageEnMView1.MIO.ParamsCount - 1 do
  ImageEnMView1.MIO.Params[i].TIFF_Compression := ioTIFF_G4FAX;
ImageEnMView1.MIO.SaveToFileTIFF( ... );

// Change the DPI of all images
for i := 0 to ImageEnMView1.MIO.ParamsCount - 1 do
begin
  ImageEnMView1.MIO.Params[i].DpiX := 72;
  ImageEnMView1.MIO.Params[i].DpiY := 72;
end;

// Save multi-frame image in TImageEnMView as PDF with "US Letter" paper size
for i := 0 to ImageEnMView1.MIO.ParamsCount - 1 do
begin
  ImageEnMView1.MIO.Params[i].PDF_PaperSize   := iepLetter;
  ImageEnMView1.MIO.Params[i].PDF_Compression := ioPDF_JPEG;
  ImageEnMView1.MIO.Params[i].JPEG_Quality := 90;
end;
ImageEnMView1.MIO.SaveToFile('D:\output.pdf');

// Create an animated GIF file from ten source images
ImageEnMView1.Clear;
for i := 0 to 9 do
begin
  ImageEnMView1.AppendImage( format( 'D:\Source\Frame %d.bmp', [i] ));
  ImageEnMView1.MIO.Params[i].GIF_DelayTime := 10; // Display each frame for 1/10th of a second
end;
ImageEnMView1.MIO.SaveToFileGIF( 'D:\Animated.gif' );


See Also

 OnCreateParams