2021.01.25

Recently in the development of small games, art resources are a headache, so I searched some resources files on the Internet, but I was always troubled by the PList format and PNG image format. After referring to some of the big guy’s code, I made a small tool to meet my personal needs.

First put the source code address:TextureTailorHere’s another preview:

Features:

  1. Implemented by Python, open source and modifiable
  2. Support for mainstream PList and PNG texture file clipping, support format2 and 3(see the format keyword in the METADATA dictionary of plist files)
  3. Supports batch processing within the directory and exports to the same folder of the current workspace
  4. Currently, execution files are supported only on the Mac platform
  5. Format3 spriteTrimmed field supported

Key issues:

Some resource files obtained by ipA unpacking are not supported by most software and scripts in the market, for the following reasons: 1. 2. Part of Format3’s PList format is simplified and unrecognizable

At present, the script software supports the spriteTrimmed field of PLIST file, which can solve the plIST format problem

Ipa unpack game resources PNG repair solution:

Sheet instruction:

PNG file to /other/ PNGS /old. PNG

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush PNG /other/ PNGS /new.png ' ' '#### Below is to/Users/zhou/Desktop/mofiy/old / *. PNG reduction to/other/newpngs folder)Copy the code

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -dir /Users/zhou/Desktop/mofiy/new  -revert-iphone-optimizations -q /Users/zhou/Desktop/mofiy/old/*.png

#### How it works: For iOS applications, Xcode optimizes PNG files so that image previews don't show up. So how do you view these optimized files? The optimized action is done by the PngCrush tool, which you can find in Xcode. Pngcrush supports command-line options - Revert - iPhone - Optimizations. This option allows you to undo optimizations made during xcode compilation. So, to see the optimized file, you should first unoptimize it and then open it using image preview. If xcode is not installed in a standard location, you can use xcode-select to find the location of the tool: '$xcode-select-print-path' ## [[to be continued] cocos2d - x file format in the explanation] (https://blog.zengrong.net/post/explain-cocos2dx-plist-file-format/) [PlistDumper](https://github.com/qcdong2016/PlistDumper) [tp-png-split](https://github.com/ShawnZhang2015/tp-png-split)Copy the code