TIOParams.TIFF_ImageCount
Declaration
property TIFF_ImageCount: Integer;
Description
Returns the number of images/pages contained in the current TIFF. You can use
Seek to load/navigate images within the loaded file.
Note: You can use
ImageCount for generic access to the image count (not specific to an image format). For non-component access, see
EnumTiffIm.
Read-only
Examples
// Show number of pages in a TIFF
ImageEnView1.IO.LoadFromFile('C:\input.tif');
iPages := ImageEnView1.IO.Params.ImageCount;
ShowMessage('Page Count: ' + IntToStr(iPages));
// Print all pages of a TIFF
Printer.Title := 'TIFF Pages';
Printer.BeginDoc();
for i := 0 to ImageEnView1.IO.Params.ImageCount - 1 do
begin
ImageEnView1.IO.Params.ImageIndex := i;
ImageEnView1.IO.LoadFromFile('C:\input.tif');
ImageEnView1.IO.PrintImage();
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
◼ImageCount
◼IEGetFileFramesCount
◼TIFF_ImageIndex
◼Seek
◼EnumTiffIm
◼EnumTIFFStream