Forum > LCL

[Solved] Images on MainMenu with hi-res monitors

(1/2) > >>

bobonwhidbey:
For each menu item I'm using an ImageList with 16x16 JPGs. This shows up appropriately sized on 96 PPI monitors but the images are far too small on a hi-res monitor. See attached. I'd guess that my little 16x16 images will look very fuzzy when pumped up to an appropriate size, but I'd rather that than the wimpy little pictures now being shown.

Is this somehow handled with the Scaled property of the TMainMenu? Is there a way to have appropriately sized images?

wp:
Yes, ImageList.Scaled is one ingredient. The other one is that you must define which image sizes will be in the image list. So, when you need 16x16 images at 96ppi, you'll need 24x24 at 144 ppi (150%) and 32x32 at 192 ppi (200%). Before you add the first image click "New resolution" in the imagelist editor, enter 24. Then repeat with 32 etc if you need more. Ideally every image should be available in these sizes - look at the lazarus/images folder as an example. If you don't have all sizes the missing sizes will be extrapolated. But it should be noted that image quality is better when the smaller images are calculated from the larger ones. So practically you get good quality when you only add the 32x32 images to the image list.

bobonwhidbey:
Thank you WP for a great answer. For my ImageList I set Scaled to true and only used 32 x 32 JPGs or PNGs. The size is now reasonable. I anticipated some fuzziness as the 32 x 32 was shrunk to 16 x 16 on my monitor - but the icons still look fine. However, they are extremely fuzzy as you can see in the attached on my user's hi rez monitor.

wp:
What's the pixel densitiy of that user's monitor?

bobonwhidbey:
He told me it is 338.67  so it must be close to that.  Maybe 336 ?

Navigation

[0] Message Index

[#] Next page

Go to full version