缩放黑白图像
我从网络上获取图像并将其显示在 UIImage 中,但首先我将其缩小。问题是,如果图像是黑白的,结果会很糟糕,有很多白线穿过图片。
我尝试了很多变化,但没有看到任何改进,总是同样的质量差的结果。有什么建议吗?
我尝试过的一些事情(记住我在没有 UIImageView 的情况下工作):
http://iosdevelopertips.com/graphics/how-to-scale-an-image-using-an-objective-c-category.html
什么是最简单的方法使用 iPhone SDK 调整/优化图像大小?
http://www.iphonedevsdk.com/forum/iphone-sdk-development/5204-resize-image-high-quality.html
I fetch an image from the web and show it in an UIImage, but first i scaled it down. The thing is, if the image is black and white, the result is pretty bad, with lots of white lines crossing the pic.
I've tried many variations but i see no improvement, always the same poor quality result. Any tips?
Some of the things i tried (remember i'm working without an UIImageView):
http://iosdevelopertips.com/graphics/how-to-scale-an-image-using-an-objective-c-category.html
How to scale a UIImageView proportionally?
What's the easiest way to resize/optimize an image size with the iPhone SDK?
http://www.iphonedevsdk.com/forum/iphone-sdk-development/5204-resize-image-high-quality.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明@cbranch是对的,所以首先这是我找到的解决方案(没有版本):
注意,这对于iOS5来说不是必需的,不知道为什么(文档中没有任何关于这一点的内容)。
Turns out @cbranch was right, so first here is the solution i found (without releases):
Notice that this isn't necessary for iOS5, don't know why (nothing about this in the documentation).