Look at the attached project. It contains some experimental code of a TScaledImageList. The basic idea is as follows:
- Put the same images into up to three imagelists of different sizes, eg. 16x16, 24x24, and 32x32 pixels. Attach these image lists to the SmallImages, MediumImages and LargeImages of the TScaledImageList.
- Then you decide in which image size you are designing. Usually the menu images are 16x16 pixels at standard resolution of 96ppi. So, you specifiy BaseWidth and BaseHeight to be 16, and BasePixelsPerInch to be 96.
- Link the ScaledImageList to the Images property of the control needing the images.
Hi,
Talking about Glyph's,
Someday I came up with the same idea, but not as far as you (screenshot attached). sure it works.
But, exporting with different DPI's in the first place consumes a lot of time. Especially when there are lots of glyph's.
Cant't standard TImageList have those scaling abilities built-in? so we can have our ImageList with our hi-res data stored, and then the ImageList provides a well down-scaled copy of it at runtime without affecting original data?
My wish list:
It would be very nice If there was a TVectorImageList or TVecorGlyphList etc with methods to get its vectors in bitmap at desired size. and even possibly retouch them (hue, brightness, contrast etc).
btw, Where can I find unit ScaledImageList used by your example project? I'm using trunk. thanks.