Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
NOT ALL PNGS ARE CREATED EQUAL

Interestings

Not all PNGs are created equal

If you write a UIImage’s PNG representation to disk, read it back, and get the PNG representation again, you’ll get a different representation. In our case, we got 21 extra octets after the PNG header.

NSData *png1 = UIImagePNGRepresentation(image1);

[png1 writeToFile:file atomically:YES];
UIImage *image2 = [UIImage imageWithContentsOfFile:file];

NSData *png2 = UIImagePNGRepresentation(image2);

// png1 and png2 differ by 21 octets

Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *