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).
See Also
◼ImageIndex◼GIF_ImageCount◼Seek// 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;