Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Poor image quality in ListView

I'm populating a ListView with items and add images from an ImageList (in the designer). The images, however, are displayed in very poor quality, even though I've set the image size in the ImageList to their original size (16x16). Have a look:

Terrible image quality http://balazsbotond.hu/downloads/listview-icons.png

The original images are beautiful, sharp PNG icons. What can I do?

like image 691
neo2862 Avatar asked Oct 24 '09 09:10

neo2862


3 Answers

Try this line of code.

ImageList1.ColorDepth = ColorDepth.Depth16Bit;
like image 90
user2530833 Avatar answered Nov 20 '22 09:11

user2530833


change the colordepth of your imagesList that you're using for the listview and try a higher colorDepth depending on the PNGs (like Depth32Bit) and you'll see the diffrence .

like image 33
Asha Avatar answered Nov 20 '22 11:11

Asha


Well, this was pretty easy. Just don't change the image size of the ImageList after adding the images :)

like image 2
neo2862 Avatar answered Nov 20 '22 10:11

neo2862