I built an app for 4.x which should be deployed for all iPhones 3.0-4.x. I realized that the imageWithCGImage:scale:orientation method is only available in 4.0 and later. Any alternative for 3.x? For reference:
Creates and returns an image object with the specified scale and orientation factors.
+ (UIImage *)imageWithCGImage:(CGImageRef)imageRef scale:(CGFloat)scale orientation:(UIImageOrientation)orientation
My current usage:
UIImage *inputImage = [UIImage imageWithCGImage:[[UIImage imageNamed: @"arrow.png"] CGImage] scale:1.2 orientation:UIImageOrientationUp];
The scale is static (i.e. I never change it) so I might scale the image through photoshop instead but the orientation remains a necessity in my application.
Thanks!
You can do the scale, rotate (translate) with CGContext functions. Then you can use…
and