How do I rotate a image pointed to by a CGImageRef
NSString* imageFileName = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"tree002.png"];
CGDataProviderRef provider = CGDataProviderCreateWithFilename([imageFileName UTF8String]);
CGImageRef myImage = CGImageCreateWithPNGDataProvider(provider, NULL, true, kCGRenderingIntentDefault);
CGDataProviderRelease(provider);
Anyone have a clean way to rotate the image pointed to by myImage?
I figure there is a call SOMEWHERE like:
[myImage setTransform: CGAffineTransformMakeRotation(3.14/2)];
but cannot find one.
|