Why do photos lose quality when added to ImageList?

I am trying to create an ImageList for my TrayIcon, but the images are not displayed as high quality. They are very clear from the start, but as soon as I put them in an ImageList during development, they get deformed. I tried 16x16 in ICO and PNG formats.

Also, which format is preferred in ImageLists?

Please inform.

+5
source share
1 answer

First of all, make sure that you have the correct size of the images you are inserting in the width and height of the list of images. I can not give you advice on image formats, but I would say that it does not matter - if you use ICO or PNG, the result should be the same. Since there is some newer version of Delphi (I use D2009), there is a ColorDepth property, which is set to cdDeviceDependent by default. You can try changing this property, but I hope that the default setting selects the correct color depth for the inserted images.

+5
source

All Articles