Giter Club home page Giter Club logo

ipa-png-images-normalizer's Introduction

IPA PNG Images Normalizer

这是什么?

使用xcode打包的IPA文件中的png图片有些会被自动压缩成CgBI文件格式, CgBI得名于其额外的头,是苹果的专有扩展到PNG的图像格式 压缩过得图片将不会是标准的png,详细来说就是 These modifications cause the generated images to be invalid as per the current version of the PNG standard.

  • extra critical chunk (CgBI)
  • byteswapped (RGBA -> BGRA) pixel data, presumably for high-speed direct blitting to the framebuffer
  • zlib header, footer, and CRC removed from the IDAT chunk
  • premultiplied alpha (color' = color * alpha / 255)

本脚本可以解码该文件成标准png😀

原始解码方法

  • mac环境下直接使用xcrun -sdk iphoneos pngcrush -revert-iphone-optimizations
  • 非mac环境下苹果没有直接提供解码方法,可使用本脚本

使用方法

  1. 将本文件与*.ipa放在同一目录下
  2. python ipin.py
  • 注意,源文件将会被覆盖

出处和参考(版权归作者所有)

ipa-png-images-normalizer's People

Contributors

ycace avatar

Stargazers

kirisame2018 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.