I now use TIOParams.ICO_BitCount[i] to show the Bit information for each frame:
procedure TForm1.FormCreate(Sender: TObject);
begin
ImageEnMView1.SetModernStyling();
ImageEnMView1.DefaultBottomText := iedtImageDimensions;
LoadIcoFile;
end;
procedure TForm1.LoadIcoFile;
var
szFilename: string;
P: TIOParams;
i: Integer;
begin
szFilename := ImageEnMView1.MIO.ExecuteOpenDialog('Select an ICO file', ioICO);
if szFilename <> '' then
ImageEnMView1.MIO.LoadFromFile(szFilename)
else
EXIT;
P := TIOParams.Create;
try
if P.Read(szFilename) then
begin
for i := 0 to P.ImageCount - 1 do
begin
ImageEnMView1.ImageTopText[i] := 'Frame ' + IntToStr(i);
ImageEnMView1.ImageInfoText[i] := IntToStr(P.ICO_BitCount[i]) + '-bit';
end;
end;
finally
P.Free;
end;
end;
Is this correct?
However, as you can see in this screenshot, one frame is reported as 21060-bit (!):
Is this a bug?