Search code examples
c#listviewimagelistblurry

Listview icons show up blurry (C#)


I'm attempting to display a "LargeIcon" view in a listview control, however the images I specify are blurry. This is what I have so far: alt text http://img220.imageshack.us/img220/1005/blurryiconsql3.jpg

The .png files are 48x48 and that's what I have it set to display at in the ImageList properties. There's one thing that I've noticed (which is probably the cause) but I don't know how to change it. Inside the "Images Collection Editor" where you choose what images you want for the ImageList control, it looks like it's setting the wrong size for each image. alt text http://img83.imageshack.us/img83/5218/imagepropertiesmf9.jpg

As you can see the "PhysicalDimension" and the "Size" is set to 16x16 and not abled to be manipulated. Does anyone have any ideas? Many thanks!


Solution

  • When adding a .PNG Icon format size the editor tends to pick the first entry size in that file, so it picks up the 16x16 entry and it's stretching that out. That's why you see the 16x16 in the properties there. As suggested, the support for PNG is poor, I'm often found myself rolling over to another format as well to avoid this.

    You can open the file in Paint.Net if you need a free editor or something more fully featured like Photoshop or Fireworks and extract the exact size you want.