• 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
Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions


  • Subject: Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions
  • From: Ray <email@hidden>
  • Date: Tue, 27 Mar 2012 19:19:13 +0200

Andreas:

On Mar 27, 2012, at 6:41 PM, Andreas Mayer wrote:

> The scale value is the same as set in UIGraphicsBeginImageContextWithOptions(), as far as I can tell.

Right, that was what I meant actually.


> But it will be lost when creating PNG data and reading it again. (Since I don't see a way of creating a PNG file without using UIImagePNGRepresentation() it doesn't seem to matter if the data was saved to a file or not.)

You have a point here ;)


> So either imageWithData does not restore the scale from PNG data or UIImagePNGRepresentation() does not store it in the first place.
>
> I see that as a bug, since the PNG format is able to hold that information.

Yes, I think it is imageWithData that is the culprit. In this WWDC session, they actually state that they specifically did this because some older applications would get in trouble. I don't remember how they worded it, it was addressed very briefly. I will watch that part again. Edit: I just checked and they say they do this for compatibility reasons. It's around the 9'40'' mark, session 134 - Optimize your iPhone App for the Retina Display (WWDC 2010, I assume you have access)...



_______________________________________________

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: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions
      • From: Andreas Mayer <email@hidden>
References: 
 >Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions (From: Ray <email@hidden>)
 >Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions (From: Marco Tabini <email@hidden>)
 >Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions (From: Andreas Mayer <email@hidden>)
 >Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions (From: Ray <email@hidden>)
 >Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions
  • Next by Date: Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions
  • Previous by thread: Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions
  • Next by thread: Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions
  • Index(es):
    • Date
    • Thread