ImageEn, unit iexBitmaps

TIOParams.TIFF_ImageIndex

TIOParams.TIFF_ImageIndex


Declaration

property TIFF_ImageIndex: integer;


Description

The index (zero-based) of the current page of the loaded TIFF image. You can also use Seek to load/navigate images within the loaded file.

Note: You can use ImageIndex for generic access to the image index (not specific to an image format).


Examples

// Want the second page of the TIFF
ImageEnView1.IO.Params.TIFF_ImageIndex := 1;
ImageEnView1.IO.LoadFromFile('C:\input.tif');

// Print all pages of a TIFF
Printer.Title := 'TIFF Pages';
Printer.BeginDoc;
for I := 0 to ImageEnView1.IO.Params.TIFF_ImageCount - 1 do
begin
  ImageEnView1.IO.Params.TIFF_ImageIndex := I;
  ImageEnView1.IO.LoadFromFile('C:\input.tif');
  ImageEnView1.IO.PrintImage(Printer.Canvas);
end;
Printer.EndDoc;

// Load a TIFF and save each of its pages as a BMP File
ImageEnView1.IO.LoadFromFile('C:\input.tiff'); // Load first image to get value for Params.TIFF_ImageCount
for I := 0 to ImageEnView1.IO.Params.TIFF_ImageCount - 1 do
begin
  ImageEnView1.IO.Params.TIFF_ImageIndex := I;
  ImageEnView1.IO.LoadFromFile('C:\input.tiff');
  ImageEnView1.IO.SaveToFile( format( 'D:\image_%d.bmp', [ I + 1 ]);
end;


See Also

- ImageIndex
- TIFF_ImageCount
- Seek