Domanda

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?

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top