PictureBox + ImageList - 质量损失[BUG] [英] PictureBox + ImageList - quality loss [BUG]

查看:84
本文介绍了PictureBox + ImageList - 质量损失[BUG]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!


我正在使用ImageList存储旋转旋钮图像(列表中最多200张图像)并在PictureBox中显示它们。我准备了一系列图像(尺寸:96x96或48x48) 使用KnobMan软件。全部导出为  96DPI,32位.png(使用Alpha)。当
我使用资源管理器浏览文件夹时(视图设置为中型或大型图标)一切正常。



将系列加载到ImageList中(在选项上使用相同的大小/分辨率),然后在PictureBox中显示它们,图像看起来不再那样了。可以看到质量损失(这是prtscr图像,因此背景看起来不同)。



ImageList中是否存在一些限制,或者VS中是否有选项可以保持质量...或者我是否需要创建/处理这些图像 图像以编程方式列出(使用分层图像作为示例)?


VS2103.4Express,.NET 4.5,Win7(1920x1200,96DPI,32位)




编辑:如果我将图片加载到图片框的背景图片,它看起来没问题。




解决方案

如何将它们加载到图像列表中? 你是如何创建图像列表的?你能展示代码吗? 您的屏幕截图看起来很像是将它们加载到具有4或可能8位颜色深度的图像列表中,而不是现代程序应该使用的更多
通常的24或32位颜色深度。 / BLOCKQUOTE>

Hello!

I'm using ImageList to store rotating knob images (max 200 images in list) and show them in a PictureBox. I have prepared the series of images (size: 96x96 or 48x48)  using KnobMan software. All are exported as 96DPI, 32bit .png (with Alpha). When I browse the folder using explorer (view set to medium or large icon) everything looks OK.

After loading the serie into ImageList (using equal size/resolution on options) and then showing them in PictureBox, images doesn't look as should anymore. Quality loss can be seen (this is prtscr image so background looks different).

Is there some limitation in ImageList or is there an option in VS to keep the quality ... or do I need to create/handle those image lists programmically (using layered images as for an example)?

VS2103.4Express, .NET 4.5, Win7 (1920x1200, 96DPI, 32-bit)


EDIT: If I load the image as background image for the picturebox it looks OK.


解决方案

How are you loading them into an image list?  How are you creating the image list? Can you show the code.  Your screen shot looks a lot like you are loading them into an image list with 4 or possibly 8 bits of color depth instead of the more usual 24 or 32 bit color depth that modern programs should use.


这篇关于PictureBox + ImageList - 质量损失[BUG]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆