0

I load some images from the web in my app and draw them using UIImage drawImage. I want to keep using the same images for the retina display but smooth them with interpolation. How can we accomplish this?

I suppose I'm fine with either saving (in memory) with double resolution ahead of time or scaling at render time. It depends how much it affects performance to scale during render time.

Cal
  • 1,625
  • 4
  • 20
  • 30

1 Answers1

3

Core Graphics does this automatically for you, there is absolutely no need to store upscaled bitmaps in your app, this would just be a waste of storage space. You can influence the interpolation quality of a graphics context a little bit with the CGContextSetInterpolationQuality function.

omz
  • 53,243
  • 5
  • 129
  • 141