• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CGImage / UIImage non destructive scaling possible
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: CGImage / UIImage non destructive scaling possible
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Extra menu item in a bound NSPopUpButton menu
  • Next by Date: Re: CGImage / UIImage non destructive scaling possible
  • Previous by thread: Re: NSTextView redraw while resigning first responder (sequel)
  • Next by thread: Re: CGImage / UIImage non destructive scaling possible
  • Index(es):
    • Date
    • Thread