在通过电子邮件发送截图之前,我想尽可能地压缩我的截图。我只在每个截图上做了一些工作,得到了最好的压缩比:
shutter:1920x1080px,PNG压缩了大约450 PNG的9 ->截图。我怎么能在像快门这样的截图工具中实现如此好的压缩呢?
http://tinypng.org的技术看起来非常棒:
相似的颜色在你的形象是结合在一起的。这种技术被称为“量化”。由于颜色的数量减少,24位PNG文件可以转换成更小的8位索引彩色图像。所有不必要的元数据也会被删除。结果:微小的8位PNG文件
但是快门没有“量化”选项。
质量没那么重要,我不介意让它更有价值。也许用GIF可以压缩更小的?还是少了点颜色?
发布于 2013-08-16 10:09:26
发布于 2013-05-21 23:54:22
optipng当然值得一看。它是命令行,但是您可以为它编写一个.desktop处理程序。用于批处理非常简单:
optipng -o7 *.png但要注意它是毁灭性的。它会覆盖你的文件。这通常很好,但是如果您使用的是fat格式(例如),您可能会失去有用的功能。以下是选项的完整列表:
$ optipng -h
OptiPNG 0.6.4: Advanced PNG optimizer.
Copyright (C) 2001-2010 Cosmin Truta.
Synopsis:
optipng [options] files ...
Files:
Image files of type: PNG, BMP, GIF, PNM or TIFF
Basic options:
-?, -h, -help show this help
-o <level> optimization level (0-7) default 2
-v verbose mode / show copyright and version info
General options:
-fix enable error recovery
-force enforce writing of a new output file
-keep keep a backup of the modified files
-preserve preserve file attributes if possible
-quiet quiet mode
-simulate simulation mode
-snip cut one image out of multi-image or animation files
-out <file> write output file to <file>
-dir <directory> write output file(s) to <directory>
-log <file> log messages to <file>
-- stop option switch parsing
Optimization options:
-f <filters> PNG delta filters (0-5) default 0,5
-i <type> PNG interlace type (0-1) default <input>
-zc <levels> zlib compression levels (1-9) default 9
-zm <levels> zlib memory levels (1-9) default 8
-zs <strategies> zlib compression strategies (0-3) default 0-3
-zw <window size> zlib window size (32k,16k,8k,4k,2k,1k,512,256)
-full produce a full report on IDAT (might reduce speed)
-nb no bit depth reduction
-nc no color type reduction
-np no palette reduction
-nx no reductions
-nz no IDAT recoding
Optimization details:
The optimization level presets
-o0 <=> -o1 -nx -nz
-o1 <=> [use the libpng heuristics] (1 trial)
-o2 <=> -zc9 -zm8 -zs0-3 -f0,5 (8 trials)
-o3 <=> -zc9 -zm8-9 -zs0-3 -f0,5 (16 trials)
-o4 <=> -zc9 -zm8 -zs0-3 -f0-5 (24 trials)
-o5 <=> -zc9 -zm8-9 -zs0-3 -f0-5 (48 trials)
-o6 <=> -zc1-9 -zm8 -zs0-3 -f0-5 (120 trials)
-o7 <=> -zc1-9 -zm8-9 -zs0-3 -f0-5 (240 trials)
The libpng heuristics
-o1 <=> -zc9 -zm8 -zs0 -f0 (if PLTE is present)
-o1 <=> -zc9 -zm8 -zs1 -f5 (if PLTE is not present)
The most exhaustive search (not generally recommended)
[no preset] -zc1-9 -zm1-9 -zs0-3 -f0-5 (1080 trials)
Examples:
optipng file.png (default speed)
optipng -o5 file.png (moderately slow)
optipng -o7 file.png (very slow)
optipng -i1 -o7 -v -full -sim experiment.png还有其他工具(例如pngcrush),您可能会发现它们更有用,但我从未偏离过optipng,仅仅是因为它的简单性。
这里有一个相当全面的PNG压缩拍摄,非常有趣:
https://askubuntu.com/questions/298401
复制相似问题