CGContextDrawImage draws large images very blurry

拥有回忆 提交于 2019-12-04 12:45:30
Andrea

I don't know exactly for osx but I can give you some advices.

  • Check the contentScale property as stated in commets, I wrote also a question about it, but I never had a real answer
  • Most of time blurriness is due to unmatching pixel, this asks to the system to apply antialiasing on the image, I see that you set a contentsRect this, with the contentsGravity, probably could change proportion and scaling of the image turning it into a blur one. Here a good answer about it.
  • Which is your contentGravity?
  • Keep it simple in first try, do you really need to draw async?

Hope this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!