Frage

UIImageView *assetImageView = [[UIImageView alloc] initWithFrame:viewFrames];
[assetImageView setContentMode:UIViewContentModeScaleToFill];
[assetImageView setImage:[UIImage imageWithCGImage:[self.asset thumbnail]]];
[self addSubview:assetImageView];

This code generate a blurry image because of the reduction in quality and I found that I need to use this

CGContextSetInterpolationQuality(context, kCGInterpolationHigh);

But how do i apply this code in my case?

War es hilfreich?

Lösung

I'd recommend reading this article. Use the code there to resize the image to the right size before passing it to UIImageView.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top