Philipp Otto
Philipp Otto

Reputation: 4111

Objective-C: Sharpen images created with CGContextdrawPDFPage

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?

Upvotes: 1

Views: 494

Answers (1)

Philipp Otto
Philipp Otto

Reputation: 4111

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.

Upvotes: 0

Related Questions