图标到位图大于32 x 32 [英] Icon to Bitmap Larger than 32 x 32

查看:77
本文介绍了图标到位图大于32 x 32的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道一种将图标转换为大于32 x 32的位图的方法吗?我试图显示用户选择的图标,但是32 x 32有点太小.我知道我首先需要一个大于32 x 32的图标,但是

Anyone know of a way of converting an icon to a bitmap that would be larger than 32 x 32? I am trying to display the icon that a user chooses, but 32 x 32 is a tad bit too small. I know I need an icon to be larger than 32 x 32 in the first place, which I do, but the

Icon.ToBitmap

似乎只能显示16 x 16和32 x 32不管图标有多大.

预先感谢.

seems to only do 16 x 16 and 32 x 32 regardless how big the icons are.

Thanks in advance.

推荐答案

通常这没有任何意义.好吧,多大?位图通常太小; 40x40或64x64的尺寸可以认为是非常大的,几乎找不到更大的尺寸.另外,请确保您具有合法权利以所需方式使用某些可用位图.

但是最重​​要的因素是:您可以以可接受的质量重新采样任何位图,除非极端情况下很小(16像素或32像素已经很小),这通常需要手动改进,而这又需要特殊的改进.技能和经验.至于扩大,所有自动重采样方法都给出了很差的质量. (曾经听说过信息熵, http://en.wikipedia.org/wiki/Entropy_%28information_theory%29 [^ ]?)

对于或多或少的大图像(例如,约50个像素或更多),创建和存储矢量图像会更加有益.每次需要位图时,都应将矢量图像缩放到位图的大小(或更大,以便以后进行后续重新采样),然后将其导出为位图.导出的位图也可以用于创建图标.一种高度推荐的产品是开源Inkscape,请参阅:
http://en.wikipedia.org/wiki/Inkscape [ http://inkscape.org/ [ ^ ].



抱歉,误解了.图标中有多个位图.提取它们很容易.请参阅此CodeProject文章:
使用VB.NET提取和显示图标 [ ^ ].

注意类IconImage,并在本文随附的代码中查看其工作方式.

—SA
It makes no sense, usually. Well, how larger? The bitmaps are usually too small; sizes of 40x40 or 64x64 can be considered as very big, you hardly can find any bigger. Also, makes sure you have a legal rights to use some available bitmap the way you want.

But the most important factor is this: you can re-sample any bitmap down with acceptable quality, unless extreme cases of a very small ones (16, or 32 pixels are already small), which usually requires manual improvements, which in turn requires special skills and experience. As to the enlargements, all automatic re-sampling methods gives quite lousy quality. (Ever heard of information entropy, http://en.wikipedia.org/wiki/Entropy_%28information_theory%29[^]?)

For more or less large images (say, some 50 pixels and more), it''s way more beneficial to create and store vector image. Each time you need a bitmap, you should scale a vector image to the size of the bitmap (or more, for subsequent re-sampling down later), and export it as a bitmap. The exported bitmaps can be used to create icons as well. One highly recommended product is the open-source Inkscape, please see:
http://en.wikipedia.org/wiki/Inkscape[^],
http://inkscape.org/[^].



Sorry for misunderstanding. There are more than one bitmap in the icon. Extracting them is easy enough. Please see this CodeProject article:
Extracting and displaying icons with VB.NET[^].

Pay attention for the class IconImage and see how it works in the code which comes with the article.

—SA


Icon.ToBitmap



它可以正常工作,只是必须确保图标仅包含所需的大小,或者尝试以某种方式将图标拆分为不同的大小然后再使用它.



It works, just gotta must make sure the icon only contains the size you want or try somehow splitting the icon into different sizes and then using it.


这篇关于图标到位图大于32 x 32的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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