The antialias of rotated CGImage/CGlayer seems jaggy, UIImageView’s is not
I need to mask a "texture" image with a rotated greyscale image.
I found out, that I have to do it with CGImages or CGlayers (if there is a simplier way using UIImageViews only, please let me know about it).
My problem is simple:
The antialias of any rotation-transformed CG stuff is quiet jaggy...
... but the antialias of a rotation-transformed UIImageView is kinda perfect. How can I produce that beautiful antialiased rotations?
I've uploaded a "proof" involving actual iPhone Simulator screenshots, to see what am I talkin' about:
![[Image: Proof.png]](http://gotoandplay.freeblog.hu/files/Proof.png)
I've tried to use CGImages, CGLayers, UIImageViews "captured" with renderInContext, I've tried to CGContextSetInterpolationQuality to high, and also tried to set CGContextSetAllowsAntialiasing - CGContextSetShouldAntialias, but every case returned the same jaggy result.
I'm planning to learn using OpenGL next year, but this development should released using CoreGraphics only. Please let me know how to get a perfectly rendered rotated image, I just can't accept it's impossible.
I found out, that I have to do it with CGImages or CGlayers (if there is a simplier way using UIImageViews only, please let me know about it).
My problem is simple:
The antialias of any rotation-transformed CG stuff is quiet jaggy...
... but the antialias of a rotation-transformed UIImageView is kinda perfect. How can I produce that beautiful antialiased rotations?
I've uploaded a "proof" involving actual iPhone Simulator screenshots, to see what am I talkin' about:
![[Image: Proof.png]](http://gotoandplay.freeblog.hu/files/Proof.png)
I've tried to use CGImages, CGLayers, UIImageViews "captured" with renderInContext, I've tried to CGContextSetInterpolationQuality to high, and also tried to set CGContextSetAllowsAntialiasing - CGContextSetShouldAntialias, but every case returned the same jaggy result.
I'm planning to learn using OpenGL next year, but this development should released using CoreGraphics only. Please let me know how to get a perfectly rendered rotated image, I just can't accept it's impossible.
If you could post some code for your 3 different versions that would go a long way.
Ok, I will.
First I write a "skeleton" code which is short enough, an still creates the "bug".
After work..
First I write a "skeleton" code which is short enough, an still creates the "bug".
After work..
I don't know about iPhone, but in general, CG and Cocoa let you select the "quality" of image processing. It may be the case that the quality settings are differing.
Sounds promising.
Can you tell me something about how to set the "quality" you've mentioned?
Can you tell me something about how to set the "quality" you've mentioned?
For NSImage, you can use: http://developer.apple.com/mac/library/d...erpolation
For CG, see: http://developer.apple.com/mac/library/d...g-BJEBGEGB
Now, I'm just assuming that what you're seeing here is different quality settings.
EDIT: I'm loving Apple's new online documentation.
For CG, see: http://developer.apple.com/mac/library/d...g-BJEBGEGB
Now, I'm just assuming that what you're seeing here is different quality settings.
EDIT: I'm loving Apple's new online documentation.
I've tried these setting already without any useful result.

