DElphi 7
I am trying to convert icons to bitmaps like this
Icon := TIcon.Create;
try
Icon.LoadFromFile(ImagePath);
Ibmap.Height := Icon.Height;//wrong if icon is
Ibmap.Width := Icon.Width;//bigger than 32 x 32
Ibmap.Canvas.Draw(0, 0, Icon);
{Save the BMP}
Ibmap.SaveToFile('c:\temp\test.bmp');
finally
Icon.Free;
end;
The height and width of the icon are returned as 32 when the icon is lager than 32 x 32.
Can anyone tell me how to get the correct height and width of an icon?
I am trying to convert icons to bitmaps like this
Icon := TIcon.Create;
try
Icon.LoadFromFile(ImagePath);
Ibmap.Height := Icon.Height;//wrong if icon is
Ibmap.Width := Icon.Width;//bigger than 32 x 32
Ibmap.Canvas.Draw(0, 0, Icon);
{Save the BMP}
Ibmap.SaveToFile('c:\temp\test.bmp');
finally
Icon.Free;
end;
The height and width of the icon are returned as 32 when the icon is lager than 32 x 32.
Can anyone tell me how to get the correct height and width of an icon?