UIImage ScaleToFit 禁用抗锯齿?
在缩放 uiimage 中的图像时,有什么方法可以禁用抗锯齿吗?谢谢
is there any way to disable antialiasing when scaling images in uiimage? thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将 QuartzCore 框架添加到您的项目中,然后将图像视图的
layer
的magnificationFilter
属性设置为kCAFilterNearest
。Add the QuartzCore framework to your project, then set the image view’s
layer
’smagnificationFilter
property tokCAFilterNearest
.我在 Xcode 11 (Swift 5) 中使用 SpriteKit 也遇到了这个问题。为了解决这个问题(即禁用抗锯齿),我执行了以下操作:
I was working with SpriteKit in Xcode 11 (Swift 5) and also got this problem. To solve it (i.e. disable anti-aliasing) i did the following: