I use an imageView to display an image on a CALayer.
After I apply some scaling to it (down to 0.2) using CGAffineTransformMakeScale(scale,scale), I get ugly blurriness.
It seems like the transformation matrix actually affects the image, rather than have it stored somewhere in memory in its full res and operating on that.
What might be a way to keep that image details crisp still ?
Thanks!
EDIT:
Here’s the code as asked for
The object inherits from CALayer.
theScale = 0.2;
trans = CGAffineTransformMakeScale(theScale,theScale);
[self setAffineTransform:trans];
Later on in the code:
theScale = 1.0;
trans = CGAffineTransformMakeScale(theScale,theScale);
[self setAffineTransform:trans];
If the issue is blurriness while scaling down, have you tried setting CGContextSetInterpolationQuality(context, kCGInterpolationHigh); before making your transform?
If the issue is pixelation while scaling up, the workaround is having a higher resolution image and scaling down instead.