pixeloffsetmode的默认值? [英] Default value of pixeloffsetmode?

查看:430
本文介绍了pixeloffsetmode的默认值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在前一段时间( https://iconverticons.com )写了一个使用.NET Graphics API的快速小PNG到ICO转换器调整大小和合成的图像。



最近我的一个用户遇到了一个问题,他们注意到一些缩小的图像有一个半透明边缘左边。我将其追溯到我正在进行合成的Graphics对象的PixelOffsetMode。



我尝试了什么:



将PixelOffsetMode更改为PixelOffsetMode.HighQuality似乎解决了合成问题,但我似乎找不到关于默认PixelOffsetMode应该是什么的好文档。默认选项为Half似乎违反直觉,但这是我最好的猜测。有什么想法吗?

I wrote up a quick little PNG to ICO converter a while back ( https://iconverticons.com ) that uses the .NET Graphics API to do the image resizing and compositing.

One of my users of the recently ran into an issue where they noticed some of the downscaled images had a semi-transparent edge along the left side. I traced this back to the PixelOffsetMode of the Graphics object I was doing the compositing in.

What I have tried:

Changing the PixelOffsetMode to PixelOffsetMode.HighQuality seems to have resolved the compositing issue, but I can't seem to find good documentation on what the default PixelOffsetMode is supposed to be. It seems counterintuitive for the default option to be "Half", but that's my best guess. Any ideas?

推荐答案

查看代码(参考资料来源 [< a href =http://referencesource.microsoft.com/target =_ blanktitle =New Window> ^ ])我发现它为0,转换为默认...同样as None ...

看看它的含义: PixelOffsetMode枚举(Windows) [ ^ ]
Looking into the code (Reference Source[^]) I found it to be 0, which translates to Default...which same as None...
See what does in means: PixelOffsetMode enumeration (Windows)[^]


这篇关于pixeloffsetmode的默认值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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