Declaration
property ICO_ImageIndex: Integer;
Description
The index (zero-based) of the current image of the current icon file. An icon file can contain multiple images of varying sizes and color depths. Use
ImageCount to return the number of images the file contains.
Note: You can use
ImageIndex for generic access to the image index (not specific to an image format).
See Also
◼ImageCount◼EnumICOIm// Load the second image inside 'alfa.ico'
ImageEnView1.IO.Params.ICO_ImageIndex := 1;
ImageEnView1.IO.LoadFromFile('C:\alfa.ico');
// Load an icon and save each of its pages as a BMP File
ImageEnView1.IO.LoadFromFile('C:\input.ico'); // Load first image to get value for Params.ImageCount
for I := 0 to ImageEnView1.IO.Params.ImageCount - 1 do
begin
ImageEnView1.IO.Params.ICO_ImageIndex := I;
ImageEnView1.IO.LoadFromFile('C:\input.ico');
ImageEnView1.IO.SaveToFile( format( 'D:\image_%d.bmp', [ I + 1 ]);
end;