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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to