CGImage / UIImage non destructive scaling possible
CGImage / UIImage non destructive scaling possible
- Subject: CGImage / UIImage non destructive scaling possible
- From: Philip Mobley <email@hidden>
- Date: Sat, 7 Aug 2010 15:13:37 -0700
Reading up on the docs for both CGImage and UIImage, I see that there is a scale property, but there doesn't appear to be any way to modify the scale factor of an CGImage without resampling (and therefore changing the pixels).
Below is a comment from the UIImage.scale (property) read-only, and if I want to modify the scale of an open CGImage is to save it to disk, and reopen it using the scale factor tag as described below... is this the only way?
iPhone 4.0 Library notes from UIImage.scale:
> "If you load an image from a file whose name includes the @2x modifier, the scale is set to 2.0. If the filename does not include the modifier but is in the PNG or JPEG format and has an associated DPI value, a corresponding scale factor is computed and reflected in this property. You can also specify an explicit scale factor when initializing an image from a Core Graphics image. All other images are assumed to have a scale factor of 1.0."
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden