wpf – Windows 10所有DPI设置上的所有图标分辨率?格式?像素艺
只需跳到答案部分的答案,问题部分就有猜测和错误.答案是基于实验而且准确无误.
很长一段时间我使用了一个png打包的256px ico文件用于我的Visual Studio项目,它运行良好,导致缩放在这些图标上工作正常,几乎没有空间,我之前并不在意. 但现在我有一个需要“保留硬边”的图标,它是“像素艺术”. >我需要生成哪些大小才能合并到ico中(我不关心pre win7图标)? 我确实找到了它:不幸的是VS说:Windows Presentation Foundation(WPF)项目不支持VisualElements.有没有解决的办法? 我环顾四周,收集了可能的尺寸@ 1x(96DPI): 没那么糟糕,但如果我添加1.25x,1.5x,2.0x然后我们得到: 我还制作了一个ico,它具有rgba中的所有上述分辨率,并且每个都有它的大小,所以你可以看到哪些窗口加载了哪个dpi设置.你可以从here下载并在vs项目中使用它进行测试. 据我所知,256px下的所有内容都无法压缩,这是对的吗? 我是否需要所有这些尺寸来保留像素完美图标?只有32位(RGBA)png好吗?我希望我不需要包括其他深度. 在我从规范中写了一个ico writer之后,我意识到png可以有0分辨率因为x或y可以使用1个字节(但我从未见过非正方形的ico,也许curs可以是非正方形),在此case可能是文件中的第一个用零分辨率来使用…这不确定,但我认为它离真相不远.看图像.重新调整问题仍然让我感到困惑,如果我明天有一些时间我会测试它.像素完美图标似乎是不可能的:将一个图像重新缩放到256px以上的任何值. 解决方法
答案:
在ICO文件中的256px下,PNG是否可以接受? 你能在ICO中添加大于1024px的图像吗? 所有DPI设置包括哪些尺寸? 请注意,Windows RT应用程序不使用ICO文件,它们使用PNG或字体,这来自Firefox的来源: <Application xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <VisualElements ShowNameOnSquare150x150Logo='on' Square150x150Logo='browserVisualElementsVisualElements_150.png' Square70x70Logo='browserVisualElementsVisualElements_70.png' ForegroundText='light' BackgroundColor='#0996f8'/> </Application> 那么Firefox在中型磁贴的开始菜单上有一个大图标? 如果你为Windows 10制作图标,你最好使用我的工具和photoshop(或类似的东西),而不是其他任何东西,我试过编辑,他们很糟糕. win10iconTools by me 您可以创建ICO文件(作为MS建议与否)或创建印有分辨率的图标,后者是我用来制作表格的图标. 对于图标中的像素艺术,不可能是完美的:(除非我们可以在Windows 10中更改缩放算法. 如果Windows获取所有图标16到255,则大于255(表中为0)的1选择以下大小: | | Windows 10 | | | 96DPI | 120DPI | 144DPI | 168DPI | | icon |disp.|load|disp.|load|disp.|load|disp.|load| |-------------------------------------------|-----|----|-----|----|-----|----|-----|----| | alt-tab | 24 | 32 | 30 | 32 | 36 | 32 | 42 | 32 | | desktop large | 96 | 0 | 120 | 0 | 144 | 0 | 168 | 0 | | desktop medium | 48 | 48 | 60 | 60 | 72 | 72 | 84 | 84 | | desktop small | 32 | 32 | 40 | 40 | 48 | 48 | 56 | 56 | | explorer content,inc0 | 32 | 32 | 40 | 40 | 48 | 48 | 56 | 56 | | explorer extra large | 256 | 0 | 256 | 0 | 256 | 0 | 256 | 0 | | explorer large | 96 | 0 | 120 | 0 | 144 | 0 | 168 | 0 | | explorer medium | 48 | 48 | 60 | 60 | 72 | 72 | 84 | 84 | | explorer small:inc4,list:inc3,details:inc2| 16 | 16 | 20 | 20 | 24 | 24 | 28 | 28 | | explorer tiles,inc1 | 48 | 48 | 60 | 60 | 72 | 72 | 84 | 84 | | startmenu medium | 32 | 32 | 40 | 40 | 48 | 48 | 56 | 63 | | startmenu programs | 24 | 24 | 30 | 30 | 36 | 36 | 42 | 42 | | startmenu search | 32 | 60 | 40 | 60 | 48 | 60 | 56 | 0 | | startmenu tile small | 24 | 24 | 30 | 31 | 36 | 39 | 42 | 47 | | taskbar normal | 24 | 32 | 30 | 40 | 36 | 48 | 42 | 56 | | taskbar small | 16 | 16 | 20 | 20 | 24 | 24 | 28 | 28 | | window icon | 16 | 16 | 20 | 16 | 24 | 16 | 28 | 16 | | desktop inc0 | 16 | 16 | 20 | 20 | 24 | 24 | 28 | 28 | | desktop inc1 | 18 | 32 | 23 | 40 | 27 | 48 | 32 | 56 | | desktop inc2 | 20 | 30 | 25 | 40 | 30 | 48 | 35 | 56 | | desktop inc3 | 22 | 32 | 28 | 40 | 33 | 48 | 39 | 56 | | desktop inc4 | 24 | 32 | 30 | 40 | 36 | 48 | 42 | 56 | | desktop inc5 | 27 | 32 | 34 | 40 | 41 | 48 | 47 | 56 | | desktop inc6 | 30 | 32 | 38 | 40 | 45 | 48 | 53 | 56 | | desktop inc7 | 33 | 48 | 41 | 60 | 50 | 72 | 58 | 84 | | desktop inc8 | 37 | 48 | 46 | 60 | 56 | 72 | 65 | 84 | | desktop inc9 | 41 | 48 | 51 | 60 | 62 | 72 | 72 | 84 | | desktop inc10 | 46 | 48 | 58 | 60 | 69 | 72 | 82 | 84 | | desktop inc11 | 51 | 0 | 64 | 0 | 77 | 0 | 89 | 0 | | desktop inc12 | 57 | 0 | 71 | 0 | 86 | 0 | 100 | 0 | | desktop inc13 | 63 | 0 | 79 | 0 | 95 | 0 | 110 | 0 | | desktop inc14 | 70 | 0 | 88 | 0 | 105 | 0 | 123 | 0 | | desktop inc15 | 78 | 0 | 98 | 0 | 117 | 0 | 137 | 0 | | desktop inc16 | 87 | 0 | 109 | 0 | 131 | 0 | 152 | 0 | | desktop inc17 | 97 | 0 | 121 | 0 | 146 | 0 | 170 | 0 | | desktop inc18 | 108 | 0 | 135 | 0 | 162 | 0 | 189 | 0 | | desktop inc19 | 120 | 0 | 150 | 0 | 180 | 0 | 210 | 0 | | desktop inc20 | 133 | 0 | 166 | 0 | 200 | 0 | 233 | 0 | | desktop inc21 | 148 | 0 | 185 | 0 | 222 | 0 | 256 | 0 | | desktop inc22 | 164 | 0 | 205 | 0 | 246 | 0 | 256 | 0 | | desktop inc23 | 182 | 0 | 228 | 0 | 256 | 0 | 256 | 0 | | desktop inc24 | 202 | 0 | 253 | 0 | 256 | 0 | 256 | 0 | | desktop inc25 | 224 | 0 | 256 | 0 | 256 | 0 | 256 | 0 | | desktop inc26 | 249 | 0 | 256 | 0 | 256 | 0 | 256 | 0 | | explorer inc5 | 18 | 32 | 23 | | | | | | | explorer inc6 | 20 | 32 | 25 | | | | | | | explorer inc7 | 22 | 32 | 28 | | | | | | | explorer inc8 | 23 | 32 | 29 | | | | | | | explorer inc9 | 25 | 32 | 31 | | | | | | | explorer inc10 | 27 | 32 | 34 | | | | | | | explorer inc11 | 29 | 32 | 36 | | | | | | | explorer inc12 | 31 | 32 | 39 | | | | | | | explorer inc13 | 33 | 48 | 41 | | | | | | | explorer inc14 | 35 | 48 | 44 | | | | | | | explorer inc15 | 38 | 48 | 48 | | | | | | | explorer inc16 | 41 | 48 | 51 | | | | | | | explorer inc17 | 44 | 48 | 55 | | | | | | | explorer inc18 | 47 | 48 | 59 | | | | | | | explorer inc19 | 50 | 0 | 63 | | | | | | | explorer inc20 | 54 | 0 | 68 | | | | | | | explorer inc44 | 239 | 0 | 256 | 0 | | | | | | explorer inc45 | 256 | 0 | 256 | 0 | | | | | 桌面上有27个缩放增量 图标格式规范: |**block** |**offset** |**offset** |**length** |**description** | |-----------|-----------|-----------|-----------|-------------------------------| |main header| 0 | | 2 |Reserved=0 | | | 2 | | 2 |Image type: 1(.ICO) 2(.CUR) | | | 4 | | 2 |Number of images in container | |image head1| 6 | 0 | 1 |Pixel width | | | 7 | 1 | 1 |Pixel height | | | 8 | 2 | 1 |Color palette size or 0 | | | 9 | 3 | 1 |Reserved=0 | | | A | 4 | 2 |Color planes=0 or 1 | | | C | 6 | 2 |Bits per Pixel | | | E | 8 | 4 |Image raw size | | | 12 | C | 4 |Offset of imageblock from BOF | |image head2| 16 | 0 | 1 |Pixel width | | ... | ... | ... | ... |... | |imageblock1| ... | ... | ... |all image data goes here: | | | ... | ... | ... | pngs included in whole | | | ... | ... | ... | bmps missing first 14 bytes | (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- windows-server-2012-r2 – Windows Server 2012 – 通过外
- 正确的方法来获得Windows控件的首选大小
- Windows Azure和Amazon AWS之间的站点到站点VPN
- Windows – 错误处理批处理文件和Sqlcmd
- .net – 任务栏中应用程序图标上的Win7进度条?
- Windows – 甚至管理员无法注册ASP.NET 4
- Windows“iowait”CPU利用率报告
- windows – 与findstr.exe进行逻辑OR比较
- opencv下模拟实现的简单文本输入窗口
- 使用Microsoft jQuery vsdoc 1.7.1 CDN与Visual Studio 201