List icons appear blurry (C #)

I am trying to display the "LargeIcon" view in a listview control, however the images I specified are blurry. This is what I still have: alt text http://img220.imageshack.us/img220/1005/blurryiconsql3.jpg

..png files are 48x48 and what I set to display in the ImageList properties. One thing I noticed (this is probably the reason), but I don't know how to change it. Inside the “Image Collection Editor”, where you select which images you want for the ImageList control, it looks like it sets the wrong size for each image. alt text http://img83.imageshack.us/img83/5218/imagepropertiesmf9.jpg

As you can see, "PhysicalDimension" and "Size" are set to 16x16 and are not controlled. Does anyone have any ideas? Thank you very much!

+4
source share
5 answers

When adding the .PNG icon format format, the editor tries to select the first record size in this file, so he takes a 16x16 record and stretches it. That is why you see 16x16 in properties there. As suggested, PNG support is poor, I often find myself in a different format to avoid this.

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

+3
source

Be sure to set ImageList.ImageSize to 48 x 48.

+4
source

I'm not sure what the problem is in this particular case, but Microsoft's support for the PNG format is usually small. Try adding .bmp images and they should be displayed in order.

+1
source

Be sure to set the ImageList parameter to 48x48 px DO , add images.

If ImageList is set to 32x32 and you add a 48x48 image, the icon will be changed to 32x32. When you change ImageList to 48x48, the image changes again, which leads to loss of quality and blur.

In addition, Paint.NET (or Photoshop) cannot open .ico files.

Visual Studio / .NET can handle 32-bit PNG images, but VS's built-in image editor is a bit weak.

+1
source

Check also the ColorDepth parameter on your ImageList. I had a similar problem with the TreeView control, but after reading a previous post regarding the size that I found this option, played with it a bit and found that it greatly affects how the images from ImageList are displayed. The higher the depth, the better the quality.

0
source

Source: https://habr.com/ru/post/1276992/


All Articles