Declaration
property GIF_ImageIndex: Integer;
Description
The index (zero-based) of the current image of the loaded GIF 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 GIF
ImageEnView1.IO.Params.GIF_ImageIndex := 1;
ImageEnView1.IO.LoadFromFile('C:\Animation.gif');
// Print all images of a GIF
Printer.Title := 'GIF Frames';
Printer.BeginDoc();
for i := 0 to ImageEnView1.IO.Params.GIF_ImageCount - 1 do
begin
ImageEnView1.IO.Params.GIF_ImageIndex := i;
ImageEnView1.IO.LoadFromFile('C:\input.gif');
ImageEnView1.IO.PrintImage();
end;
Printer.EndDoc();
// Load a GIF and save each of its pages as a BMP File
ImageEnView1.IO.LoadFromFile('C:\input.gif'); // Load first image to get value for Params.GIF_ImageCount
for i := 0 to ImageEnView1.IO.Params.GIF_ImageCount - 1 do
begin
ImageEnView1.IO.Params.GIF_ImageIndex := i;
ImageEnView1.IO.LoadFromFile('C:\input.gif');
ImageEnView1.IO.SaveToFile( Format( 'D:\Image_%d.bmp', [ i + 1 ]);
end;
See Also
◼ImageIndex
◼GIF_ImageCount
◼Seek