1

I create UIImages from pdf with CGContextDrawPDFPage.

The quality wasn´t satisfying so I tried

CGContextSetInterpolationQuality(context,kCGRenderingIntentDefault);

and it worked out. But the quality of the resulting images is still not good enough. The image looks totally blurry on the iPad.

How can I increase the quality and sharpen the image a bit?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Philipp Otto
  • 4,061
  • 2
  • 32
  • 49
  • What size are the PDF pages you're creating and how are you creating / showing the images? – Wain Jul 31 '13 at 12:40
  • The pdf pages have a width of 1683 and a height of 595. I create the images using CGContextDrawImagePDFPage and then save them to a file using [UIImagePNGRepresentation(image) writeToFile:...] – Philipp Otto Jul 31 '13 at 13:00

1 Answers1

0

I could get better results by using

UIGraphicsBeginImageContextWithOptions

instead of

UIGraphicsBeginImageContext

for beginning the image context.

The parameter scale set to 0.0 did the trick.

Philipp Otto
  • 4,061
  • 2
  • 32
  • 49