Restore PNG files in the iPhone app

Source: Internet
Author: User

From: http://summic.com/post/53/

Apple iPhone applicationsProgramThe PNG Image in is specially processed. A non-standard cgbi data segment is added after the PNG file header, and the image data in the idat segment does not have the traditional compressed data header or tail, in addition, red and blue are reversed, so that they cannot be used normally on Mac or windows.

Yang has done, first download this program: http://acquisition.dreamhosters.com/iPhonePNG.zip

Decompress the package and copy the onepng binary file to the/applications directory.

Assume that your image is under the./IMG directory and you want to convert it to The./decode directory,

Run the following command on the terminal:

$ Find./IMG-name "*. PNG"-exec/applications/iphonepng {}\;

By default, after the converted image is added with a suffix, it is placed in the same directory of the original image and moved in batches:

$ Find./IMG-name "* decoded.png"-exec MV {}./decode \;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.