This uses a modified pngcrush from apple to undo its optimizations. Guess this will work with all crushed pngs. See this for more accurated command xcrun
This will uncrush all files from actual directory and its subdirectories. Don't worry about call it twice, from my experience does not corrupt already uncrushed pngs. From here you will find that ipin.py does not deoptimize all apple pngs
It (ipin.py) cannot handle multiple IDAT chunks, does not work with Adam7 interlaced images, and does not fix pre-multiplied alpha.
Use an specific gnome binary tool. This needs a few low level steps:
$ git clone https://github.com/hadess/fixpng-thumbnailer.git
$ cd fixpng-thumbnailer
$ ./autogen.sh
$ make
$ sudo make install
After that, you have available a new command gnome-fixpng-thumbnailer which works like this
Take care with this command, because it corrupts pngs if is called twice on same png.
I use it this way:
$ for file in *.png; do echo " $file";gnome-fixpng-thumbnailer $file $file; done
You will guess why echoed the filename. Thats because this command could fail silently, (no $? with nonzero if fails) and the only clue you will have is a "ZLib error! -3" message. It's a quick solution because funnily enough you will find ipin.py does uncrush those files.
Read this for yet another tool around pngdefry. It provides an invaluable info about all this stuff -even its source- but I haven't tried myself.
My hope is in pngcrush absorbs those functionality so you have it out of the box, at least I have send a mail to pngcrush maintainer (hi Glenn).
发布评论
评论(2)
iphone-fixpng 适用于 Linux。请参阅此讨论解释它的作用。我链接到 web.archive.org 因为原始版本已关闭。
iphone-fixpng works in Linux. See this discussion explaining what it does. I'm linking to web.archive.org because the original is down.
您可以选择使用其中之一:
使用 VirtualBox 在 Linux 中安装 Hackintosh。在其中安装 Xcode,然后执行类似 这个
这使用苹果修改后的 pngcrush 来撤消其优化。我猜这适用于所有压碎的 png。请参阅此以获取更准确的命令xcrun
从 iPIN.py href="http://www.axelbrz.com.ar/?mod=iphone-png-images-normalizer" rel="nofollow noreferrer">此博客并执行为
这将解压缩实际目录及其子目录中的所有文件。不用担心调用两次,根据我的经验,不会损坏已经未粉碎的 png。从此处您会发现 ipin.py 不会对所有苹果 png 进行去优化
<块引用>
它 (ipin.py) 无法处理多个 IDAT 块,不适用于 Adam7 交错图像,并且无法修复预乘 Alpha。
使用特定的gnome二进制工具。这需要一些低级步骤:
之后,您就可以使用一个新命令gnome-fixpng-thumbnailer,其工作原理如下
$ gnome-fixpng-thumbnailer [输入文件] [输出文件]
请小心使用此命令,因为如果对同一个 png 调用两次,它会损坏 png。
我这样使用它:
您会猜到为什么要回显文件名。那是因为这个命令可能会默默地失败(如果失败则没有 $? 且非零),并且您将得到的唯一线索是“ZLib 错误!-3”消息。这是一个快速的解决方案,因为有趣的是,您会发现 ipin.py 确实可以解压这些文件。
阅读本文了解有关 pngdefry 的另一个工具。它提供了有关所有这些东西的宝贵信息 - 甚至它的来源 - 但我自己还没有尝试过。
我希望 pngcrush 吸收这些功能,这样你就可以开箱即用,至少我有发送邮件给 pngcrush 维护者(嗨 Glenn)。
You can choose to use one of this:
Install Hackintosh inside linux, with VirtualBox. install Xcode inside it, then do something like this
This uses a modified pngcrush from apple to undo its optimizations. Guess this will work with all crushed pngs. See this for more accurated command xcrun
Download iPIN.py from this blog and execute as
This will uncrush all files from actual directory and its subdirectories. Don't worry about call it twice, from my experience does not corrupt already uncrushed pngs. From here you will find that ipin.py does not deoptimize all apple pngs
Use an specific gnome binary tool. This needs a few low level steps:
After that, you have available a new command gnome-fixpng-thumbnailer which works like this
$ gnome-fixpng-thumbnailer [INPUT FILE] [OUTPUT FILE]
Take care with this command, because it corrupts pngs if is called twice on same png.
I use it this way:
You will guess why echoed the filename. Thats because this command could fail silently, (no $? with nonzero if fails) and the only clue you will have is a "ZLib error! -3" message. It's a quick solution because funnily enough you will find ipin.py does uncrush those files.
Read this for yet another tool around pngdefry. It provides an invaluable info about all this stuff -even its source- but I haven't tried myself.
My hope is in pngcrush absorbs those functionality so you have it out of the box, at least I have send a mail to pngcrush maintainer (hi Glenn).