本文介绍了ImageMagick:PNG的无损最大压缩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用ImageMagick保存到无损PNG时,我希望获得最大压缩量。我正在批量转换许多PSD。



我尝试了一些东西,但它看起来像我生成的PNG图像不像原始图像那样清晰,尽管我的妻子看不到它。



这些是我正在玩的当前参数:

  convert -depth 24 -define png:compression-filter = 1 \ 
-define png:compression-level = 9 -define png:compression-strategy = 2

根据:
。除了纯粹的图像数据和大小之外,它不包含任何日期,时间或统计数据或其他任何内容,因此可以比较像素值是否通过压缩而发生变化。



然后我写了一个脚本如下压缩参考图像使用所有可能的过滤器,策略和级别来查看文件大小,如果他们遭受任何损失,因此不同于参考 PPM 图片:



以下是脚本:

 # !/ bin / bash 
convert -depth 24 -size 200x200 xc:red gradient:black-white \(xc:white + noise random \)+ append reference.png
convert reference.png参考{0..5}中f的.ppm
;在{0..9}中为l做
;为{0..4}中的s做
; do
outfile =out _ $ {f} _ $ {l} _ $ {s} .png
convert reference.png -define png:compression-filter = $ f -define png:compression- level = $ l -define png:compression-strategy = $ s$ outfile
size = $(OSXFileSize$ outfile)
echo filter:$ f,level:$ l,strategy:$ s,大小:$ size
转换$ outfile$ outfile.ppm
diff$ outfile.ppmreference.ppm
done
done
done

所有文件的比较相同,因此任何参数似乎都没有任何压缩损失我用了。大小如下:

  filter:0,level:0,strategy:0,size:720796 
filter:0,level:0,strategy:1,size:720796
filter:0,level:0,strategy:2,size:720801
filter:0,level:0,strategy:3,大小:718136
筛选条件:0,级别:0,策略:4,大小:720796
筛选条件:0,级别:1,策略:0,大小:246377
筛选条件:0,级别:1,策略:1,大小:246377
筛选:0,级别:1,策略:2,大小:524864
筛选:0,级别:1,策略:3,大小:517549
filter:0,level:1,strategy:4,size:259348
filter:0,level:2,strategy:0,size:246377
filter:0,level:2,strategy: 1,大小:246377
筛选条件:0,级别:2,策略:2,大小:524864
筛选条件:0,级别:2,策略:3,大小:517549
筛选条件:0 ,级别:2,策略:4,大小:259348
筛选条件:0,级别:3,策略:0,大小:246377
筛选条件:0,级别:3,策略:1,大小:246377
filter:0,level:3,strategy:2,size:524864
filter:0,level:3,strategy:3,size:517549
filter:0,level:3,策略:4,大小:259348
筛选条件:0,级别:4,策略:0,大小:244894
筛选条件:0,级别:4,策略:1,大小:244859
筛选条件:0,级别:4,策略:2,大小:524864
筛选:0,级别:4,策略:3,大小:517549
筛选:0,级别:4,策略:4,大小:258039
filter:0,level:5,strategy:0,size:244916
filter:0,level:5,strategy:1,size:244881
filter:0,level:5,strategy: 2,大小:524864
筛选条件:0,级别:5,策略:3,大小:517549
筛选条件:0,级别:5,策略:4,大小:258064
筛选条件:0 ,级别:6,策略:0,大小:244916
筛选条件:0,级别:6,策略:1,大小:244881
筛选条件:0,级别:6,策略:2,大小:524864
筛选条件:0,级别:6,策略:3,大小:517549
筛选条件:0,级别:6,策略:4,大小:258064
筛选条件:0,级别:7,策略:0,大小:244916
筛选条件:0,级别:7,策略:1,大小:244881
筛选条件:0,级别:7,策略:2,大小:524864
filter :0,等级:7,策略:3,大小:517549
过滤:0,等级:7,策略:4,大小:258064
过滤:0,等级:8,str ategy:0,大小:244433
筛选条件:0,级别:8,策略:1,大小:244405
筛选条件:0,级别:8,策略:2,大小:524864
filter :0,等级:8,策略:3,大小:517549
过滤:0,等级:8,策略:4,大小:257674
过滤:0,等级:9,策略:0,大小:244433
筛选条件:0,级别:9,策略:1,大小:244405
筛选条件:0,级别:9,策略:2,大小:524864
筛选条件:0,级别: 9,策略:3,大小:517549
筛选:0,级别:9,策略:4,大小:257674
筛选:1,级别:0,策略:0,大小:720796
filter:1,level:0,strategy:1,size:720796
filter:1,level:0,strategy:2,size:720801
filter:1,level:0,strategy:3 ,大小:286904
筛选条件:1,级别:0,策略:4,大小:720796
筛选条件:1,级别:1,策略:0,大小:247643
筛选条件:1,级别:1,策略:1,大小:247643
筛选条件:1,级别:1,策略:2,大小:331829
筛选条件:1,级别:1,策略:3,大小:245708
过滤:1,等级:1,策略:4,大小:260505
过滤:1,等级:2,策略:0,大小:247375
过滤:1,等级l:2,策略:1,大小:247375
筛选条件:1,级别:2,策略:2,大小:331829
筛选条件:1,级别:2,策略:3,大小:245708
过滤:1,等级:2,策略:4,大小:260452
过滤:1,等级:3,策略:0,大小:247375
过滤:1,等级:3,策略:1,大小:247375
筛选:1,级别:3,策略:2,大小:331829
筛选:1,级别:3,策略:3,大小:245708
filter: 1,等级:3,策略:4,大小:260452
过滤:1,等级:4,策略:0,大小:245515
过滤:1,等级:4,策略:1,大小: 245489
筛选条件:1,级别:4,策略:2,大小:331829
筛选:1,级别:4,策略:3,大小:245708
筛选:1,级别:4 ,策略:4,大小:258810
筛选:1,级别:5,策略:0,大小:245544
筛选:1,级别:5,策略:1,大小:245519
filter:1,级别:5,策略:2,大小:331829
筛选条件:1,级别:5,策略:3,大小:245708
筛选:1,级别:5,策略:4,大小:258835
筛选条件:1,级别:6,策略:0,大小:245597
筛选:1,级别:6,策略:1,大小:245570
filter :1,级别:6,策略:2,大小:331829
筛选:1,级别:6,策略:3,大小:245708
筛选:1,级别:6,策略:4,大小:258885
筛选:1,级别:7,策略:0,大小:245597
筛选:1,级别:7,策略:1,大小:245570
筛选:1,级别: 7,策略:2,大小:331829
筛选:1,等级:7,策略:3,大小:245708
筛选:1,等级:7,策略:4,大小:258885
filter:1,级别:8,策略:0,大小:245251
筛选条件:1,级别:8,策略:1,大小:245230
筛选:1,级别:8,策略:2 ,大小:331829
筛选条件:1,级别:8,策略:3,大小:245708
筛选:1,级别:8,策略:4,大小:258587
筛选:1,级别:9,策略:0,大小:245267
筛选条件:1,等级:9,策略:1,大小:245254
筛选条件:1,级别:9,策略:2,大小:331829
过滤:1,等级:9,策略:3,大小:245708
过滤:1,等级:9,策略:4,大小:258589
过滤:2,等级:0,策略:0,大小:720796
筛选条件:2,级别:0,策略:1,大小:720796
筛选条件:2,级别:0,策略:2,大小:720801
filter:2,level:0,strategy:3,size:628470
filter:2,level:0,strategy:4,size:720796
filter:2,level:1,strategy:0 ,大小:246114
筛选条件:2,级别:1,策略:1,大小:246114
筛选条件:2,级别:1,策略:2,大小:439545
筛选条件:2,级别:1,策略:3,大小:358177
筛选条件:2,级别:1,策略:4,大小:258999
筛选条件:2,级别:2,策略:0,大小:246114
过滤:2,等级:2,策略:1,大小:246114
过滤:2,等级:2,策略:2,大小:439545
过滤:2,等级:2,策略:3,大小:358177
筛选条件:2,级别:2,策略:4,大小:258999
筛选条件:2,级别:3,策略:0,大小:246114
filter: 2,等级:3,策略:1,大小:246114
过滤:2,等级:3,策略:2,大小:439545
过滤:2,等级:3,策略:3,大小: 358177
筛选条件:2,级别:3,策略:4,大小:258999
筛选条件:2,级别:4,策略:0,大小:244701
筛选条件:2,级别:4 ,策略:1,大小:244679
筛选条件:2,级别:4,策略:2,大小:439545
筛选条件:2,级别:4,策略:3,大小:35 8177
筛选条件:2,级别:4,策略:4,大小:257722
筛选条件:2,级别:5,策略:0,大小:244721
筛选条件:2,级别:5 ,策略:1,大小:244700
筛选条件:2,级别:5,策略:2,大小:439545
筛选条件:2,级别:5,策略:3,大小:358177
filter:2,level:5,strategy:4,size:257744
filter:2,level:6,strategy:0,size:244727
filter:2,level:6,strategy:1,大小:244704
筛选条件:2,级别:6,策略:2,大小:439545
筛选条件:2,级别:6,策略:3,大小:358177
筛选条件:2,级别:6,策略:4,大小:257744
筛选条件:2,级别:7,策略:0,大小:244727
筛选条件:2,级别:7,策略:1,大小:244704
筛选条件:2,级别:7,策略:2,大小:439545
筛选条件:2,级别:7,策略:3,大小:358177
筛选条件:2,级别:7,策略: 4,大小:257744
筛选条件:2,级别:8,策略:0,大小:244340
筛选条件:2,级别:8,策略:1,大小:244322
筛选:2 ,等级:8,策略:2,大小:439545
筛选条件:2,等级:8,策略:3,大小:358177
筛选条件:2,等级:8,策略:4,大小:257436
筛选条件:2,级别:9,策略:0,大小:244155
筛选条件:2,级别:9,策略:1,大小:244130
筛选条件:2,级别:9,策略:2,大小:439545
筛选条件:2,等级:9,策略:3,大小:358177
筛选条件:2,等级:9,策略:4,大小:257298
filter:3,level:0,strategy:0,size:720796
filter:3,level:0,strategy:1,size:720796
filter:3,level:0,strategy: 2,大小:720801
筛选条件:3,级别:0,策略:3,大小:600694
筛选条件:3,级别:0,策略:4,大小:720796
筛选条件:3 ,级别:1,策略:0,大小:247741
筛选条件:3,级别:1,策略:1,大小:247741
筛选条件:3,级别:1,策略:2,大小:429487
筛选条件:3,级别:1,策略:3,大小:346943
筛选条件:3,级别:1,策略:4,大小:260468
筛选条件:3,级别:2,策略:0,大小:247711
筛选条件:3,级别:2,策略:1,大小:247711
筛选条件:3,级别:2,策略:2,大小:429487
filter :3,级别:2,策略:3,大小:346943
过滤:3,级别:2,策略:4,大小:260444
过滤:3,级别:3,str ategy:0,大小:247463
筛选条件:3,级别:3,策略:1,大小:247463
筛选条件:3,级别:3,策略:2,大小:429487
filter :3,级别:3,策略:3,大小:346943
筛选条件:3,级别:3,策略:4,大小:260331
筛选:3,级别:4,策略:0,大小:245681
筛选条件:3,级别:4,策略:1,大小:245659
筛选条件:3,级别:4,策略:2,大小:429487
筛选条件:3,级别: 4,策略:3,大小:346943
筛选条件:3,等级:4,策略:4,大小:258797
筛选条件:3,等级:5,策略:0,大小:245685
filter:3,级别:5,策略:1,大小:245663
筛选条件:3,级别:5,策略:2,大小:429487
筛选条件:3,级别:5,策略:3 ,大小:346943
筛选条件:3,级别:5,策略:4,大小:258796
筛选条件:3,级别:6,策略:0,大小:245686
筛选条件:3,级别:6,策略:1,大小:245665
筛选条件:3,级别:6,策略:2,大小:429487
筛选条件:3,级别:6,策略:3,大小:346943
过滤:3,级别:6,策略:4,大小:258796
筛选条件:3,级别:7,策略:0,大小:245686
筛选:3,级别l:7,策略:1,大小:245665
筛选条件:3,等级:7,策略:2,大小:429487
筛选条件:3,等级:7,策略:3,大小:346943
过滤:3,等级:7,策略:4,大小:258796
过滤:3,等级:8,策略:0,大小:245474
过滤:3,等级:8,策略:1,大小:245458
筛选条件:3,级别:8,策略:2,大小:429487
筛选条件:3,级别:8,策略:3,大小:346943
filter: 3,等级:8,策略:4,大小:258628
过滤:3,等级:9,策略:0,大小:245508
过滤:3,等级:9,策略:1,大小: 245491
筛选条件:3,级别:9,策略:2,大小:429487
筛选条件:3,级别:9,策略:3,大小:346943
筛选条件:3,级别:9 ,策略:4,大小:258639
筛选:4,级别:0,策略:0,大小:720796
筛选:4,级别:0,策略:1,大小:720796
filter:4,level:0,strategy:2,size:720801
filter:4,level:0,strategy:3,size:284043
filter:4,level:0,strategy:4,大小:720796
筛选:4,级别:1,策略:0,大小:246892
筛选:4,级别:1,策略:1,大小:246892
filter :4,级别:1,策略:2,大小:331489
筛选条件:4,级别:1,策略:3,大小:245305
筛选条件:4,级别:1,策略:4,大小:259428
筛选条件:4,级别:2,策略:0,大小:246299
筛选条件:4,级别:2,策略:1,大小:246299
筛选条件:4,级别: 2,策略:2,大小:331489
筛选:4,级别:2,策略:3,大小:245305
筛选:4,级别:2,策略:4,大小:259021
filter:4,级别:3,策略:0,大小:246316
筛选条件:4,级别:3,策略:1,大小:246316
筛选条件:4,级别:3,策略:2 ,大小:331489
筛选:4,级别:3,策略:3,大小:245305
筛选:4,级别:3,策略:4,大小:259026
筛选:4,级别:4,策略:0,大小:244335
筛选条件:4,级别:4,策略:1,大小:244259
筛选:4,级别:4,策略:2,大小:331489
过滤:4,等级:4,策略:3,大小:245305
过滤:4,等级:4,策略:4,大小:257491
过滤:4,等级:5,策略:0,大小:244343
筛选:4,级别:5,策略:1,大小:244260
筛选:4,级别:5,策略:2,大小:331489
filter:4,level:5,strategy:3,size:245305
filter:4,level:5,strategy:4,size:257494
filter:4,level:6,strategy:0 ,大小:244350
筛选条件:4,级别:6,策略:1,大小:244262
筛选:4,级别:6,策略:2,大小:331489
筛选:4,级别:6,策略:3,大小:245305
筛选:4,级别:6,策略:4,大小:257500
筛选:4,级别:7,策略:0,大小:244350
过滤:4,等级:7,策略:1,大小:244262
过滤:4,等级:7,策略:2,大小:331489
过滤:4,等级:7,策略:3,大小:245305
筛选:4,级别:7,策略:4,大小:257500
筛选:4,级别:8,策略:0,大小:244282
filter: 4,等级:8,策略:1,大小:244251
过滤:4,等级:8,策略:2,大小:331489
过滤:4,等级:8,策略:3,大小: 245305
筛选条件:4,级别:8,策略:4,大小:257461
筛选条件:4,级别:9,策略:0,大小:244321
筛选:4,级别:9 ,策略:1,大小:244284
筛选条件:4,级别:9,策略:2,大小:331489
筛选条件:4,级别:9,策略:3,大小:24 5305
筛选条件:4,级别:9,策略:4,大小:257473
筛选条件:5,级别:0,策略:0,大小:720796
筛选条件:5,级别:0 ,策略:1,大小:720796
筛选条件:5,等级:0,策略:2,大小:720801
筛选条件:5,等级:0,策略:3,大小:287526
filter:5,level:0,strategy:4,size:720796
filter:5,level:1,strategy:0,size:247117
filter:5,level:1,strategy:1,大小:247117
筛选条件:5,级别:1,策略:2,大小:331910
筛选条件:5,级别:1,策略:3,大小:246241
筛选条件:5,级别:1,策略:4,大小:259811
筛选条件:5,级别:2,策略:0,大小:246903
筛选条件:5,级别:2,策略:1,大小:246903
filter:5,level:2,strategy:2,size:331910
filter:5,level:2,strategy:3,size:246241
filter:5,level:2,strategy: 4,大小:259757
筛选条件:5,级别:3,策略:0,大小:246976
筛选条件:5,级别:3,策略:1,大小:246976
筛选:5 ,等级:3,策略:2,大小:331910
筛选条件:5,等级:3,策略:3,大小:246241
筛选条件:5,等级:3,策略:4,大小:259742
筛选条件:5,级别:4,策略:0,大小:245005
筛选条件:5,级别:4,策略:1,大小:244969
筛选条件:5,级别:4,策略:2,大小:331910
筛选条件:5,等级:4,策略:3,大小:246241
筛选条件:5,等级:4,策略:4,大小:258135
filter:5,level:5,strategy:0,size:245025
filter:5,level:5,strategy:1,size:244985
filter:5,level:5,strategy: 2,大小:331910
筛选条件:5,级别:5,策略:3,大小:246241
筛选条件:5,级别:5,策略:4,大小:258149
筛选:5 ,级别:6,策略:0,大小:245056
筛选条件:5,级别:6,策略:1,大小:245009
筛选条件:5,级别:6,策略:2,大小:331910
过滤器:5,级别:6,策略:3,大小:246241
筛选:5,级别:6,策略:4,大小:258176
筛选条件:5,级别:7,策略:0,大小:245056
筛选条件:5,级别:7,策略:1,大小:245009
筛选条件:5,级别:7,策略:2,大小:331910
filter :5,级别:7,策略:3,大小:246241
筛选条件:5,级别:7,策略:4,大小:258176
筛选条件:5,级别:8,str ategy:0,大小:244838
筛选条件:5,等级:8,策略:1,大小:244841
筛选条件:5,等级:8,策略:2,大小:331910
筛选:5,级别:8,策略:3,大小:246241
筛选条件:5,级别:8,策略:4,大小:258009
筛选条件:5,级别:9,策略:0,大小:244857
筛选条件:5,级别:9,策略:1,大小:244857
筛选条件:5,级别:9,策略:2,大小:331910
筛选条件:5,级别: 9,策略:3,大小:246241
筛选条件:5,等级:9,策略:4,大小:258009

显然你的数字会有所不同,因为你的图像不同,所以你必须看看什么对你的数据有用 - 但希望这将是一个起点。



请注意,如果按尺寸对上述内容进行排序,我会得到:

  filter:2,level: 9,策略:1,大小:244127 
筛选条件:2,等级:9,策略:0,大小:244156
筛选:4,等级:8,策略:1,大小:244251
filter:4,level:4,strategy:1,size:244258
filter:4,level:5,strategy:1,size:244260
filter:4,级别:6,策略:1,大小:244262
筛选条件:4,级别:7,策略:1,大小:244262
筛选:4,级别:8,策略:0,大小:244283
过滤:4,级别:9,策略:1,大小:244285
过滤:2,级别:8,策略:1,大小:244319
过滤器:4,级别:9,策略:0,大小:244321
筛选条件:4,级别:4,策略:0,大小:244333
筛选条件:2,级别:8,策略:0,大小:244341
filter: 4,等级:5,策略:0,大小:244341
过滤:4,等级:6,策略:0,大小:244350
过滤:4,等级:7,策略:0,大小: 244350
筛选条件:0,级别:8,策略:1,大小:244408
筛选条件:0,级别:9,策略:1,大小:244408
筛选条件:0,级别:8 ,策略:0,大小:244442
筛选条件:0,级别:9,策略:0,大小:244442
筛选条件:2,级别:4,策略:1,大小:244677
filter:2,level:5,strategy:1,size:244699
filter:2,level:4,strategy:0,size:244701
filter:2,level:6,strategy:1,大小:244704
筛选条件:2,级别:7,策略:1,大小:244704
筛选条件:2,级别:5,策略:0,大小:244723
f ilter:2,级别:6,策略:0,大小:244729
筛选条件:2,级别:7,策略:0,大小:244729
筛选条件:5,级别:8,策略:1,大小:244813
筛选条件:5,级别:8,策略:0,大小:244822
筛选条件:5,级别:9,策略:1,大小:244840
筛选条件:5,级别:9,策略:0,大小:244853
筛选:0,级别:4,策略:1,大小:244860
筛选:0,级别:5,策略:1,大小:244885
filter:0,level:6,strategy:1,size:244885
filter:0,level:7,strategy:1,size:244885
filter:0,level:4,strategy: 0,大小:244897
筛选条件:0,级别:5,策略:0,大小:244922
筛选条件:0,级别:6,策略:0,大小:244922
筛选:0 ,级别:7,策略:0,大小:244922
筛选条件:5,级别:4,策略:1,大小:244940
筛选条件:5,级别:5,策略:1,大小:244956
过滤器:5,级别:6,策略:1,大小:244980
筛选条件:5,等级:7,策略:1,大小:244980
筛选条件:5,等级:4,策略:0,大小:244982
筛选条件:5,级别:5,策略:0,大小:245000
筛选条件:5,级别:6,策略:0,大小:24503 0
筛选条件:5,级别:7,策略:0,大小:245030
筛选:1,级别:8,策略:1,大小:245243
筛选:1,级别:9 ,策略:1,大小:245245
筛选:1,级别:8,策略:0,大小:245267
筛选:1,级别:9,策略:0,大小:245270
filter:4,级别:1,策略:3,大小:245307
筛选条件:4,级别:2,策略:3,大小:245307
筛选条件:4,级别:3,策略:3,大小:245307
筛选条件:4,级别:4,策略:3,大小:245307
筛选条件:4,级别:5,策略:3,大小:245307
筛选:4,级别:6,策略:3,大小:245307
筛选:4,级别:7,策略:3,大小:245307
筛选:4,级别:8,策略:3,大小:245307
filter:4,level:9,strategy:3,size:245307
filter:3,level:8,strategy:1,size:245460
filter:5,level:1,strategy: 3,大小:245469
筛选条件:5,级别:2,策略:3,大小:245469
筛选条件:5,级别:3,策略:3,大小:245469
筛选:5 ,等级:4,策略:3,大小:245469
筛选条件:5,等级:5,策略:3,大小:245469
筛选条件:5,等级:6,策略:3,si ze:245469
筛选条件:5,级别:7,策略:3,大小:245469
筛选条件:5,级别:8,策略:3,大小:245469
筛选条件:5,级别:9,策略:3,大小:245469
筛选条件:3,等级:8,策略:0,大小:245487
筛选条件:3,等级:9,策略:1,大小:245493
filter:1,level:4,strategy:1,size:245503
filter:3,level:9,strategy:0,size:245521
filter:1,level:4,strategy: 0,大小:245529
筛选条件:1,级别:5,策略:1,大小:245533
筛选:1,级别:5,策略:0,大小:245559
筛选:1 ,等级:6,策略:1,大小:245584
筛选条件:1,等级:7,策略:1,大小:245584
筛选条件:1,级别:6,策略:0,大小:245606
过滤:1,等级:7,策略:0,大小:245606
过滤:3,等级:4,策略:1,大小:245663
过滤:3,等级:5,策略:1,大小:245668
筛选条件:3,级别:6,策略:1,大小:245669
筛选条件:3,级别:7,策略:1,大小:245669
filter :3,级别:4,策略:0,大小:245696
过滤:3,级别:5,策略:0,大小:245700
过滤:3,级别:6,策略gy:0,大小:245701
筛选条件:3,级别:7,策略:0,大小:245701
筛选:1,级别:1,策略:3,大小:245704
filter :1,级别:2,策略:3,大小:245704
筛选:1,级别:3,策略:3,大小:245704
筛选:1,级别:4,策略:3,大小:245704
筛选条件:1,级别:5,策略:3,大小:245704
筛选条件:1,级别:6,策略:3,大小:245704
筛选:1,级别: 7,策略:3,大小:245704
筛选:1,等级:8,策略:3,大小:245704
筛选:1,等级:9,策略:3,大小:245704
filter:2,level:1,strategy:0,size:245967
filter:2,level:1,strategy:1,size:245967
filter:2,level:2,strategy:0 ,大小:245967
筛选条件:2,级别:2,策略:1,大小:245967
筛选条件:2,级别:3,策略:0,大小:245967
筛选条件:2,级别:3,策略:1,大小:245967
筛选条件:4,级别:2,策略:0,大小:246294
筛选条件:4,级别:2,策略:1,大小:246294
过滤:4,级别:3,策略:0,大小:246309
筛选:4,级别:3,策略:1,大小:246309
筛选:0,级别:1 ,策略:0,大小:246391
筛选:0,级别:1,策略:1,大小:246391
筛选:0,级别:2,策略:0,大小:246391
filter:0,level:2,strategy:1,size:246391
filter:0,level:3,strategy:0,size:246391
filter:0,level:3,strategy:1,大小:246391
筛选条件:4,级别:1,策略:0,大小:246407
筛选条件:4,级别:1,策略:1,大小:246407
筛选条件:5,级别:2,策略:0,大小:246920
筛选条件:5,级别:2,策略:1,大小:246920
筛选条件:5,级别:1,策略:0,大小:246926
filter:5,level:1,strategy:1,size:246926
filter:5,level:3,strategy:0,size:246955
filter:5,level:3,strategy: 1,大小:246955
筛选:1,级别:2,策略:0,大小:247380
筛选:1,级别:2,策略:1,大小:247380
筛选:1 ,等级:3,策略:0,大小:247380
筛选:1,级别:3,策略:1,大小:247380
筛选条件:3,级别:1,策略:0,大小:247619
筛选条件:3,级别:1,策略:1,大小:247619
筛选条件:3,级别:2,策略:0,大小:247704
筛选条件:3,级别:2,策略:1,大小:247704
筛选条件:3,级别:3,策略:0,大小:247725
筛选条件:3,级别:3,策略:1,大小:247725
过滤:1,等级:1,策略:0,大小:247811
过滤:1,等级:1,策略:1,大小:247811
过滤:2,等级:9,策略:4,大小:257312
筛选条件:2,级别:8,策略:4,大小:257451
筛选条件:4,级别:8,策略:4,大小:257506
filter: 4,级别:9,策略:4,大小:257519
筛选:4,级别:4,策略:4,大小:257536
筛选:4,级别:5,策略:4,大小: 257539
筛选条件:4,级别:6,策略:4,大小:257546
筛选条件:4,级别:7,策略:4,大小:257546
筛选:0,级别:8 ,策略:4,大小:257721
筛选条件:0,级别:9,策略:4,大小:257721
筛选条件:2,级别:4,策略:4,大小:257737
filter:2,级别:5,策略:4,大小:257759
筛选条件:2,级别:6,策略:4,大小:257759
筛选条件:2,级别:7,策略:4,大小:257759
筛选条件:5,级别:8,策略:4,大小:258068
筛选条件:5,级别:9,策略:4,大小:258075
f ilter:0,level:4,strategy:4,size:258081
filter:0,level:5,strategy:4,size:258105
filter:0,level:6,strategy:4,大小:258105
筛选条件:0,级别:7,策略:4,大小:258105
筛选条件:5,级别:4,策略:4,大小:258190
筛选条件:5,级别:5,策略:4,大小:258203
筛选条件:5,等级:6,策略:4,大小:258230
筛选条件:5,等级:7,策略:4,大小:258230
筛选条件:3,级别:8,策略:4,大小:258614
筛选条件:1,级别:8,策略:4,大小:258625
筛选条件:1,级别:9,策略: 4,大小:258625
筛选条件:3,级别:9,策略:4,大小:258626
筛选条件:3,级别:5,策略:4,大小:258783
筛选:3 ,等级:6,策略:4,大小:258783
筛选条件:3,级别:7,策略:4,大小:258783
筛选条件:3,级别:4,策略:4,大小:258784
过滤:1,等级:4,策略:4,大小:258847
过滤:1,等级:5,策略:4,大小:258872
过滤:1,等级:6,策略:4,大小:258922
筛选条件:1,级别:7,策略:4,大小:258922
筛选条件:2,级别:1,策略:4,大小:25895 3
筛选条件:2,级别:2,策略:4,大小:258953
筛选条件:2,级别:3,策略:4,大小:258953
筛选:4,级别:2 ,策略:4,大小:259066
筛选:4,级别:3,策略:4,大小:259070
筛选:4,级别:1,策略:4,大小:259143
filter:0,level:1,strategy:4,size:259394
filter:0,level:2,strategy:4,size:259394
filter:0,level:3,strategy:4,大小:259394
筛选条件:5,级别:3,策略:4,大小:259786
筛选条件:5,级别:2,策略:4,大小:259810
筛选条件:5,级别:1,策略:4,大小:259811
筛选条件:3,级别:1,策略:4,大小:260389
筛选条件:3,级别:2,策略:4,大小:260449
筛选条件:3,级别:3,策略:4,大小:260473
筛选条件:1,级别:2,策略:4,大小:260490
筛选条件:1,级别:3,策略: 4,大小:260490
筛选:1,级别:1,策略:4,大小:260568
筛选:4,级别:0,策略:3,大小:284075
筛选:5 ,等级:0,策略:3,大小:284320
过滤:1,等级:0,策略:3,大小:286960
过滤:4,等级:1,策略:2,si ze:331440
筛选条件:4,级别:2,策略:2,大小:331440
筛选条件:4,级别:3,策略:2,大小:331440
筛选:4,级别:4,策略:2,大小:331440
筛选:4,级别:5,策略:2,大小:331440
筛选:4,级别:6,策略:2,大小:331440
筛选条件:4,级别:7,策略:2,大小:331440
筛选条件:4,级别:8,策略:2,大小:331440
筛选条件:4,级别:9,策略: 2,大小:331440
筛选条件:5,级别:1,策略:2,大小:331550
筛选条件:5,级别:2,策略:2,大小:331550
筛选:5 ,等级:3,策略:2,大小:331550
筛选条件:5,等级:4,策略:2,大小:331550
筛选条件:5,等级:5,策略:2,大小:331550
筛选条件:5,级别:6,策略:2,大小:331550
筛选条件:5,级别:7,策略:2,大小:331550
筛选条件:5,级别:8,策略:2,大小:331550
筛选条件:5,级别:9,策略:2,大小:331550
筛选条件:1,级别:1,策略:2,大小:331823
filter :1,级别:2,策略:2,大小:331823
过滤:1,级别:3,策略:2,大小:331823
过滤:1,级别:4,策略gy:2,大小:331823
筛选条件:1,级别:5,策略:2,大小:331823
筛选:1,级别:6,策略:2,大小:331823
filter :1,等级:7,策略:2,大小:331823
过滤:1,等级:8,策略:2,大小:331823
过滤:1,等级:9,策略:2,大小:331823
filter:3,level:1,strategy:3,size:346952
filter:3,level:2,strategy:3,size:346952
filter:3,level: 3,策略:3,大小:346952
筛选条件:3,等级:4,策略:3,大小:346952
筛选条件:3,等级:5,策略:3,大小:346952
filter:3,级别:6,策略:3,大小:346952
筛选条件:3,级别:7,策略:3,大小:346952
筛选条件:3,级别:8,策略:3 ,大小:346952
筛选条件:3,级别:9,策略:3,大小:346952
筛选条件:2,级别:1,策略:3,大小:358276
筛选条件:2,级别:2,策略:3,大小:358276
筛选条件:2,级别:3,策略:3,大小:358276
筛选条件:2,级别:4,策略:3,大小:358276
过滤:2,级别:5,策略:3,大小:358276
筛选条件:2,级别:6,策略:3,大小:358276
筛选条件:2,级别:7 ,策略:3,大小:358276
筛选条件:2,级别:8,策略:3,大小:358276
筛选条件:2,级别:9,策略:3,大小:358276
filter:3,级别:1,策略:2,大小:429431
筛选条件:3,级别:2,策略:2,大小:429431
筛选条件:3,级别:3,策略:2,大小:429431
筛选条件:3,级别:4,策略:2,大小:429431
筛选条件:3,级别:5,策略:2,大小:429431
筛选条件:3,级别:6,策略:2,大小:429431
筛选条件:3,等级:7,策略:2,大小:429431
筛选条件:3,等级:8,策略:2,大小:429431 $ b $b ...


I'd like to achieve a maximum amount of compression when saving to a lossless PNG using ImageMagick. I'm doing batch conversion of many PSDs.

I tried a few things, but it looks to me like the resulting PNG image is not as sharp as original image, although my wife cannot see it.

These are current arguments I'm playing with:

convert -depth 24 -define png:compression-filter=1 \ 
  -define png:compression-level=9 -define png:compression-strategy=2 

According to:http://www.imagemagick.org/script/command-line-options.php#define

And http://www.w3.org/TR/PNG-Filters.html

That means:

  • compression filter is 1 (Sub)
  • max compression level 9
  • compression strategy is 2 huffman_only (so no filtering, although this compression filter shall be lossless)

According to the documentation: "valid values are 0 through 4, meaning default, filtered, huffman_only, rle, and fixed ZLIB compression strategy. If you are using an old zlib that does not support Z_RLE (before 1.2.0) or Z_FIXED (before 1.2.2.2), values 3 and 4, respectively, will use the zlib default strategy instead."

BTW, My images are 960x720 pixels.

(If I use default compression strategy 0, I get large files. It might be that compression-filter of 9 and compression-strategy of 0 are producing smaller size images, but I am still not sure if it is lossless or not).

Questions:

  1. Is this lossless compression? If not, where is the mistake?
  2. Any idea how to achieve better lossless compression?
解决方案

I think you are at, or beyond, the limits of the ImageMagick documentation and would like to suggest you work out your answer empirically - or if you do get a definitive answer, that you at least test it empirically.

I don't have access to your images, so I generated a reference image myself, as follows. It contains a readily compressible block of solid colour (red), a black-white gradient and a bunch of noise, so there is something to make most types of compression happy or unhappy in there.

In order to test whether you have lossless compression, I would suggest you convert images to PPM format - see here. This contains no date, or time or statistics or anything but pure image data and size in an extremely simple format - thereby allowing comparison of whether pixel values have changed through compression.

Then I wrote a script as follows to compress the reference image using all the possible filters, strategies and levels to see the filesizes and if they have suffered any losses and are therefore different from the reference PPM image:

Here is the script:

#!/bin/bash
convert -depth 24 -size 200x200 xc:red gradient:black-white \( xc:white +noise random \) +append reference.png
convert reference.png reference.ppm
for f in {0..5}; do
   for l in {0..9}; do
      for s in {0..4}; do
         outfile="out_${f}_${l}_${s}.png"
         convert reference.png -define png:compression-filter=$f -define png:compression-level=$l -define png:compression-strategy=$s "$outfile"
         size=$(OSXFileSize "$outfile")
         echo filter:$f, level:$l, strategy:$s, size:$size
         convert "$outfile" "$outfile.ppm"
         diff "$outfile.ppm" reference.ppm
      done
   done
done

All files compared identically, so there doesn't seem to be any compression loss with any of the parameters I used. The sizes came out as follows:

filter:0, level:0, strategy:0, size:720796
filter:0, level:0, strategy:1, size:720796
filter:0, level:0, strategy:2, size:720801
filter:0, level:0, strategy:3, size:718136
filter:0, level:0, strategy:4, size:720796
filter:0, level:1, strategy:0, size:246377
filter:0, level:1, strategy:1, size:246377
filter:0, level:1, strategy:2, size:524864
filter:0, level:1, strategy:3, size:517549
filter:0, level:1, strategy:4, size:259348
filter:0, level:2, strategy:0, size:246377
filter:0, level:2, strategy:1, size:246377
filter:0, level:2, strategy:2, size:524864
filter:0, level:2, strategy:3, size:517549
filter:0, level:2, strategy:4, size:259348
filter:0, level:3, strategy:0, size:246377
filter:0, level:3, strategy:1, size:246377
filter:0, level:3, strategy:2, size:524864
filter:0, level:3, strategy:3, size:517549
filter:0, level:3, strategy:4, size:259348
filter:0, level:4, strategy:0, size:244894
filter:0, level:4, strategy:1, size:244859
filter:0, level:4, strategy:2, size:524864
filter:0, level:4, strategy:3, size:517549
filter:0, level:4, strategy:4, size:258039
filter:0, level:5, strategy:0, size:244916
filter:0, level:5, strategy:1, size:244881
filter:0, level:5, strategy:2, size:524864
filter:0, level:5, strategy:3, size:517549
filter:0, level:5, strategy:4, size:258064
filter:0, level:6, strategy:0, size:244916
filter:0, level:6, strategy:1, size:244881
filter:0, level:6, strategy:2, size:524864
filter:0, level:6, strategy:3, size:517549
filter:0, level:6, strategy:4, size:258064
filter:0, level:7, strategy:0, size:244916
filter:0, level:7, strategy:1, size:244881
filter:0, level:7, strategy:2, size:524864
filter:0, level:7, strategy:3, size:517549
filter:0, level:7, strategy:4, size:258064
filter:0, level:8, strategy:0, size:244433
filter:0, level:8, strategy:1, size:244405
filter:0, level:8, strategy:2, size:524864
filter:0, level:8, strategy:3, size:517549
filter:0, level:8, strategy:4, size:257674
filter:0, level:9, strategy:0, size:244433
filter:0, level:9, strategy:1, size:244405
filter:0, level:9, strategy:2, size:524864
filter:0, level:9, strategy:3, size:517549
filter:0, level:9, strategy:4, size:257674
filter:1, level:0, strategy:0, size:720796
filter:1, level:0, strategy:1, size:720796
filter:1, level:0, strategy:2, size:720801
filter:1, level:0, strategy:3, size:286904
filter:1, level:0, strategy:4, size:720796
filter:1, level:1, strategy:0, size:247643
filter:1, level:1, strategy:1, size:247643
filter:1, level:1, strategy:2, size:331829
filter:1, level:1, strategy:3, size:245708
filter:1, level:1, strategy:4, size:260505
filter:1, level:2, strategy:0, size:247375
filter:1, level:2, strategy:1, size:247375
filter:1, level:2, strategy:2, size:331829
filter:1, level:2, strategy:3, size:245708
filter:1, level:2, strategy:4, size:260452
filter:1, level:3, strategy:0, size:247375
filter:1, level:3, strategy:1, size:247375
filter:1, level:3, strategy:2, size:331829
filter:1, level:3, strategy:3, size:245708
filter:1, level:3, strategy:4, size:260452
filter:1, level:4, strategy:0, size:245515
filter:1, level:4, strategy:1, size:245489
filter:1, level:4, strategy:2, size:331829
filter:1, level:4, strategy:3, size:245708
filter:1, level:4, strategy:4, size:258810
filter:1, level:5, strategy:0, size:245544
filter:1, level:5, strategy:1, size:245519
filter:1, level:5, strategy:2, size:331829
filter:1, level:5, strategy:3, size:245708
filter:1, level:5, strategy:4, size:258835
filter:1, level:6, strategy:0, size:245597
filter:1, level:6, strategy:1, size:245570
filter:1, level:6, strategy:2, size:331829
filter:1, level:6, strategy:3, size:245708
filter:1, level:6, strategy:4, size:258885
filter:1, level:7, strategy:0, size:245597
filter:1, level:7, strategy:1, size:245570
filter:1, level:7, strategy:2, size:331829
filter:1, level:7, strategy:3, size:245708
filter:1, level:7, strategy:4, size:258885
filter:1, level:8, strategy:0, size:245251
filter:1, level:8, strategy:1, size:245230
filter:1, level:8, strategy:2, size:331829
filter:1, level:8, strategy:3, size:245708
filter:1, level:8, strategy:4, size:258587
filter:1, level:9, strategy:0, size:245267
filter:1, level:9, strategy:1, size:245254
filter:1, level:9, strategy:2, size:331829
filter:1, level:9, strategy:3, size:245708
filter:1, level:9, strategy:4, size:258589
filter:2, level:0, strategy:0, size:720796
filter:2, level:0, strategy:1, size:720796
filter:2, level:0, strategy:2, size:720801
filter:2, level:0, strategy:3, size:628470
filter:2, level:0, strategy:4, size:720796
filter:2, level:1, strategy:0, size:246114
filter:2, level:1, strategy:1, size:246114
filter:2, level:1, strategy:2, size:439545
filter:2, level:1, strategy:3, size:358177
filter:2, level:1, strategy:4, size:258999
filter:2, level:2, strategy:0, size:246114
filter:2, level:2, strategy:1, size:246114
filter:2, level:2, strategy:2, size:439545
filter:2, level:2, strategy:3, size:358177
filter:2, level:2, strategy:4, size:258999
filter:2, level:3, strategy:0, size:246114
filter:2, level:3, strategy:1, size:246114
filter:2, level:3, strategy:2, size:439545
filter:2, level:3, strategy:3, size:358177
filter:2, level:3, strategy:4, size:258999
filter:2, level:4, strategy:0, size:244701
filter:2, level:4, strategy:1, size:244679
filter:2, level:4, strategy:2, size:439545
filter:2, level:4, strategy:3, size:358177
filter:2, level:4, strategy:4, size:257722
filter:2, level:5, strategy:0, size:244721
filter:2, level:5, strategy:1, size:244700
filter:2, level:5, strategy:2, size:439545
filter:2, level:5, strategy:3, size:358177
filter:2, level:5, strategy:4, size:257744
filter:2, level:6, strategy:0, size:244727
filter:2, level:6, strategy:1, size:244704
filter:2, level:6, strategy:2, size:439545
filter:2, level:6, strategy:3, size:358177
filter:2, level:6, strategy:4, size:257744
filter:2, level:7, strategy:0, size:244727
filter:2, level:7, strategy:1, size:244704
filter:2, level:7, strategy:2, size:439545
filter:2, level:7, strategy:3, size:358177
filter:2, level:7, strategy:4, size:257744
filter:2, level:8, strategy:0, size:244340
filter:2, level:8, strategy:1, size:244322
filter:2, level:8, strategy:2, size:439545
filter:2, level:8, strategy:3, size:358177
filter:2, level:8, strategy:4, size:257436
filter:2, level:9, strategy:0, size:244155
filter:2, level:9, strategy:1, size:244130
filter:2, level:9, strategy:2, size:439545
filter:2, level:9, strategy:3, size:358177
filter:2, level:9, strategy:4, size:257298
filter:3, level:0, strategy:0, size:720796
filter:3, level:0, strategy:1, size:720796
filter:3, level:0, strategy:2, size:720801
filter:3, level:0, strategy:3, size:600694
filter:3, level:0, strategy:4, size:720796
filter:3, level:1, strategy:0, size:247741
filter:3, level:1, strategy:1, size:247741
filter:3, level:1, strategy:2, size:429487
filter:3, level:1, strategy:3, size:346943
filter:3, level:1, strategy:4, size:260468
filter:3, level:2, strategy:0, size:247711
filter:3, level:2, strategy:1, size:247711
filter:3, level:2, strategy:2, size:429487
filter:3, level:2, strategy:3, size:346943
filter:3, level:2, strategy:4, size:260444
filter:3, level:3, strategy:0, size:247463
filter:3, level:3, strategy:1, size:247463
filter:3, level:3, strategy:2, size:429487
filter:3, level:3, strategy:3, size:346943
filter:3, level:3, strategy:4, size:260331
filter:3, level:4, strategy:0, size:245681
filter:3, level:4, strategy:1, size:245659
filter:3, level:4, strategy:2, size:429487
filter:3, level:4, strategy:3, size:346943
filter:3, level:4, strategy:4, size:258797
filter:3, level:5, strategy:0, size:245685
filter:3, level:5, strategy:1, size:245663
filter:3, level:5, strategy:2, size:429487
filter:3, level:5, strategy:3, size:346943
filter:3, level:5, strategy:4, size:258796
filter:3, level:6, strategy:0, size:245686
filter:3, level:6, strategy:1, size:245665
filter:3, level:6, strategy:2, size:429487
filter:3, level:6, strategy:3, size:346943
filter:3, level:6, strategy:4, size:258796
filter:3, level:7, strategy:0, size:245686
filter:3, level:7, strategy:1, size:245665
filter:3, level:7, strategy:2, size:429487
filter:3, level:7, strategy:3, size:346943
filter:3, level:7, strategy:4, size:258796
filter:3, level:8, strategy:0, size:245474
filter:3, level:8, strategy:1, size:245458
filter:3, level:8, strategy:2, size:429487
filter:3, level:8, strategy:3, size:346943
filter:3, level:8, strategy:4, size:258628
filter:3, level:9, strategy:0, size:245508
filter:3, level:9, strategy:1, size:245491
filter:3, level:9, strategy:2, size:429487
filter:3, level:9, strategy:3, size:346943
filter:3, level:9, strategy:4, size:258639
filter:4, level:0, strategy:0, size:720796
filter:4, level:0, strategy:1, size:720796
filter:4, level:0, strategy:2, size:720801
filter:4, level:0, strategy:3, size:284043
filter:4, level:0, strategy:4, size:720796
filter:4, level:1, strategy:0, size:246892
filter:4, level:1, strategy:1, size:246892
filter:4, level:1, strategy:2, size:331489
filter:4, level:1, strategy:3, size:245305
filter:4, level:1, strategy:4, size:259428
filter:4, level:2, strategy:0, size:246299
filter:4, level:2, strategy:1, size:246299
filter:4, level:2, strategy:2, size:331489
filter:4, level:2, strategy:3, size:245305
filter:4, level:2, strategy:4, size:259021
filter:4, level:3, strategy:0, size:246316
filter:4, level:3, strategy:1, size:246316
filter:4, level:3, strategy:2, size:331489
filter:4, level:3, strategy:3, size:245305
filter:4, level:3, strategy:4, size:259026
filter:4, level:4, strategy:0, size:244335
filter:4, level:4, strategy:1, size:244259
filter:4, level:4, strategy:2, size:331489
filter:4, level:4, strategy:3, size:245305
filter:4, level:4, strategy:4, size:257491
filter:4, level:5, strategy:0, size:244343
filter:4, level:5, strategy:1, size:244260
filter:4, level:5, strategy:2, size:331489
filter:4, level:5, strategy:3, size:245305
filter:4, level:5, strategy:4, size:257494
filter:4, level:6, strategy:0, size:244350
filter:4, level:6, strategy:1, size:244262
filter:4, level:6, strategy:2, size:331489
filter:4, level:6, strategy:3, size:245305
filter:4, level:6, strategy:4, size:257500
filter:4, level:7, strategy:0, size:244350
filter:4, level:7, strategy:1, size:244262
filter:4, level:7, strategy:2, size:331489
filter:4, level:7, strategy:3, size:245305
filter:4, level:7, strategy:4, size:257500
filter:4, level:8, strategy:0, size:244282
filter:4, level:8, strategy:1, size:244251
filter:4, level:8, strategy:2, size:331489
filter:4, level:8, strategy:3, size:245305
filter:4, level:8, strategy:4, size:257461
filter:4, level:9, strategy:0, size:244321
filter:4, level:9, strategy:1, size:244284
filter:4, level:9, strategy:2, size:331489
filter:4, level:9, strategy:3, size:245305
filter:4, level:9, strategy:4, size:257473
filter:5, level:0, strategy:0, size:720796
filter:5, level:0, strategy:1, size:720796
filter:5, level:0, strategy:2, size:720801
filter:5, level:0, strategy:3, size:287526
filter:5, level:0, strategy:4, size:720796
filter:5, level:1, strategy:0, size:247117
filter:5, level:1, strategy:1, size:247117
filter:5, level:1, strategy:2, size:331910
filter:5, level:1, strategy:3, size:246241
filter:5, level:1, strategy:4, size:259811
filter:5, level:2, strategy:0, size:246903
filter:5, level:2, strategy:1, size:246903
filter:5, level:2, strategy:2, size:331910
filter:5, level:2, strategy:3, size:246241
filter:5, level:2, strategy:4, size:259757
filter:5, level:3, strategy:0, size:246976
filter:5, level:3, strategy:1, size:246976
filter:5, level:3, strategy:2, size:331910
filter:5, level:3, strategy:3, size:246241
filter:5, level:3, strategy:4, size:259742
filter:5, level:4, strategy:0, size:245005
filter:5, level:4, strategy:1, size:244969
filter:5, level:4, strategy:2, size:331910
filter:5, level:4, strategy:3, size:246241
filter:5, level:4, strategy:4, size:258135
filter:5, level:5, strategy:0, size:245025
filter:5, level:5, strategy:1, size:244985
filter:5, level:5, strategy:2, size:331910
filter:5, level:5, strategy:3, size:246241
filter:5, level:5, strategy:4, size:258149
filter:5, level:6, strategy:0, size:245056
filter:5, level:6, strategy:1, size:245009
filter:5, level:6, strategy:2, size:331910
filter:5, level:6, strategy:3, size:246241
filter:5, level:6, strategy:4, size:258176
filter:5, level:7, strategy:0, size:245056
filter:5, level:7, strategy:1, size:245009
filter:5, level:7, strategy:2, size:331910
filter:5, level:7, strategy:3, size:246241
filter:5, level:7, strategy:4, size:258176
filter:5, level:8, strategy:0, size:244838
filter:5, level:8, strategy:1, size:244841
filter:5, level:8, strategy:2, size:331910
filter:5, level:8, strategy:3, size:246241
filter:5, level:8, strategy:4, size:258009
filter:5, level:9, strategy:0, size:244857
filter:5, level:9, strategy:1, size:244857
filter:5, level:9, strategy:2, size:331910
filter:5, level:9, strategy:3, size:246241
filter:5, level:9, strategy:4, size:258009

Obviously your numbers will be different, as your images are different, so you will have to see what works for your data - but hopefully this will be a starting point.

Note that if I sort the above by size, I get this:

filter:2, level:9, strategy:1, size:244127
filter:2, level:9, strategy:0, size:244156
filter:4, level:8, strategy:1, size:244251
filter:4, level:4, strategy:1, size:244258
filter:4, level:5, strategy:1, size:244260
filter:4, level:6, strategy:1, size:244262
filter:4, level:7, strategy:1, size:244262
filter:4, level:8, strategy:0, size:244283
filter:4, level:9, strategy:1, size:244285
filter:2, level:8, strategy:1, size:244319
filter:4, level:9, strategy:0, size:244321
filter:4, level:4, strategy:0, size:244333
filter:2, level:8, strategy:0, size:244341
filter:4, level:5, strategy:0, size:244341
filter:4, level:6, strategy:0, size:244350
filter:4, level:7, strategy:0, size:244350
filter:0, level:8, strategy:1, size:244408
filter:0, level:9, strategy:1, size:244408
filter:0, level:8, strategy:0, size:244442
filter:0, level:9, strategy:0, size:244442
filter:2, level:4, strategy:1, size:244677
filter:2, level:5, strategy:1, size:244699
filter:2, level:4, strategy:0, size:244701
filter:2, level:6, strategy:1, size:244704
filter:2, level:7, strategy:1, size:244704
filter:2, level:5, strategy:0, size:244723
filter:2, level:6, strategy:0, size:244729
filter:2, level:7, strategy:0, size:244729
filter:5, level:8, strategy:1, size:244813
filter:5, level:8, strategy:0, size:244822
filter:5, level:9, strategy:1, size:244840
filter:5, level:9, strategy:0, size:244853
filter:0, level:4, strategy:1, size:244860
filter:0, level:5, strategy:1, size:244885
filter:0, level:6, strategy:1, size:244885
filter:0, level:7, strategy:1, size:244885
filter:0, level:4, strategy:0, size:244897
filter:0, level:5, strategy:0, size:244922
filter:0, level:6, strategy:0, size:244922
filter:0, level:7, strategy:0, size:244922
filter:5, level:4, strategy:1, size:244940
filter:5, level:5, strategy:1, size:244956
filter:5, level:6, strategy:1, size:244980
filter:5, level:7, strategy:1, size:244980
filter:5, level:4, strategy:0, size:244982
filter:5, level:5, strategy:0, size:245000
filter:5, level:6, strategy:0, size:245030
filter:5, level:7, strategy:0, size:245030
filter:1, level:8, strategy:1, size:245243
filter:1, level:9, strategy:1, size:245245
filter:1, level:8, strategy:0, size:245267
filter:1, level:9, strategy:0, size:245270
filter:4, level:1, strategy:3, size:245307
filter:4, level:2, strategy:3, size:245307
filter:4, level:3, strategy:3, size:245307
filter:4, level:4, strategy:3, size:245307
filter:4, level:5, strategy:3, size:245307
filter:4, level:6, strategy:3, size:245307
filter:4, level:7, strategy:3, size:245307
filter:4, level:8, strategy:3, size:245307
filter:4, level:9, strategy:3, size:245307
filter:3, level:8, strategy:1, size:245460
filter:5, level:1, strategy:3, size:245469
filter:5, level:2, strategy:3, size:245469
filter:5, level:3, strategy:3, size:245469
filter:5, level:4, strategy:3, size:245469
filter:5, level:5, strategy:3, size:245469
filter:5, level:6, strategy:3, size:245469
filter:5, level:7, strategy:3, size:245469
filter:5, level:8, strategy:3, size:245469
filter:5, level:9, strategy:3, size:245469
filter:3, level:8, strategy:0, size:245487
filter:3, level:9, strategy:1, size:245493
filter:1, level:4, strategy:1, size:245503
filter:3, level:9, strategy:0, size:245521
filter:1, level:4, strategy:0, size:245529
filter:1, level:5, strategy:1, size:245533
filter:1, level:5, strategy:0, size:245559
filter:1, level:6, strategy:1, size:245584
filter:1, level:7, strategy:1, size:245584
filter:1, level:6, strategy:0, size:245606
filter:1, level:7, strategy:0, size:245606
filter:3, level:4, strategy:1, size:245663
filter:3, level:5, strategy:1, size:245668
filter:3, level:6, strategy:1, size:245669
filter:3, level:7, strategy:1, size:245669
filter:3, level:4, strategy:0, size:245696
filter:3, level:5, strategy:0, size:245700
filter:3, level:6, strategy:0, size:245701
filter:3, level:7, strategy:0, size:245701
filter:1, level:1, strategy:3, size:245704
filter:1, level:2, strategy:3, size:245704
filter:1, level:3, strategy:3, size:245704
filter:1, level:4, strategy:3, size:245704
filter:1, level:5, strategy:3, size:245704
filter:1, level:6, strategy:3, size:245704
filter:1, level:7, strategy:3, size:245704
filter:1, level:8, strategy:3, size:245704
filter:1, level:9, strategy:3, size:245704
filter:2, level:1, strategy:0, size:245967
filter:2, level:1, strategy:1, size:245967
filter:2, level:2, strategy:0, size:245967
filter:2, level:2, strategy:1, size:245967
filter:2, level:3, strategy:0, size:245967
filter:2, level:3, strategy:1, size:245967
filter:4, level:2, strategy:0, size:246294
filter:4, level:2, strategy:1, size:246294
filter:4, level:3, strategy:0, size:246309
filter:4, level:3, strategy:1, size:246309
filter:0, level:1, strategy:0, size:246391
filter:0, level:1, strategy:1, size:246391
filter:0, level:2, strategy:0, size:246391
filter:0, level:2, strategy:1, size:246391
filter:0, level:3, strategy:0, size:246391
filter:0, level:3, strategy:1, size:246391
filter:4, level:1, strategy:0, size:246407
filter:4, level:1, strategy:1, size:246407
filter:5, level:2, strategy:0, size:246920
filter:5, level:2, strategy:1, size:246920
filter:5, level:1, strategy:0, size:246926
filter:5, level:1, strategy:1, size:246926
filter:5, level:3, strategy:0, size:246955
filter:5, level:3, strategy:1, size:246955
filter:1, level:2, strategy:0, size:247380
filter:1, level:2, strategy:1, size:247380
filter:1, level:3, strategy:0, size:247380
filter:1, level:3, strategy:1, size:247380
filter:3, level:1, strategy:0, size:247619
filter:3, level:1, strategy:1, size:247619
filter:3, level:2, strategy:0, size:247704
filter:3, level:2, strategy:1, size:247704
filter:3, level:3, strategy:0, size:247725
filter:3, level:3, strategy:1, size:247725
filter:1, level:1, strategy:0, size:247811
filter:1, level:1, strategy:1, size:247811
filter:2, level:9, strategy:4, size:257312
filter:2, level:8, strategy:4, size:257451
filter:4, level:8, strategy:4, size:257506
filter:4, level:9, strategy:4, size:257519
filter:4, level:4, strategy:4, size:257536
filter:4, level:5, strategy:4, size:257539
filter:4, level:6, strategy:4, size:257546
filter:4, level:7, strategy:4, size:257546
filter:0, level:8, strategy:4, size:257721
filter:0, level:9, strategy:4, size:257721
filter:2, level:4, strategy:4, size:257737
filter:2, level:5, strategy:4, size:257759
filter:2, level:6, strategy:4, size:257759
filter:2, level:7, strategy:4, size:257759
filter:5, level:8, strategy:4, size:258068
filter:5, level:9, strategy:4, size:258075
filter:0, level:4, strategy:4, size:258081
filter:0, level:5, strategy:4, size:258105
filter:0, level:6, strategy:4, size:258105
filter:0, level:7, strategy:4, size:258105
filter:5, level:4, strategy:4, size:258190
filter:5, level:5, strategy:4, size:258203
filter:5, level:6, strategy:4, size:258230
filter:5, level:7, strategy:4, size:258230
filter:3, level:8, strategy:4, size:258614
filter:1, level:8, strategy:4, size:258625
filter:1, level:9, strategy:4, size:258625
filter:3, level:9, strategy:4, size:258626
filter:3, level:5, strategy:4, size:258783
filter:3, level:6, strategy:4, size:258783
filter:3, level:7, strategy:4, size:258783
filter:3, level:4, strategy:4, size:258784
filter:1, level:4, strategy:4, size:258847
filter:1, level:5, strategy:4, size:258872
filter:1, level:6, strategy:4, size:258922
filter:1, level:7, strategy:4, size:258922
filter:2, level:1, strategy:4, size:258953
filter:2, level:2, strategy:4, size:258953
filter:2, level:3, strategy:4, size:258953
filter:4, level:2, strategy:4, size:259066
filter:4, level:3, strategy:4, size:259070
filter:4, level:1, strategy:4, size:259143
filter:0, level:1, strategy:4, size:259394
filter:0, level:2, strategy:4, size:259394
filter:0, level:3, strategy:4, size:259394
filter:5, level:3, strategy:4, size:259786
filter:5, level:2, strategy:4, size:259810
filter:5, level:1, strategy:4, size:259811
filter:3, level:1, strategy:4, size:260389
filter:3, level:2, strategy:4, size:260449
filter:3, level:3, strategy:4, size:260473
filter:1, level:2, strategy:4, size:260490
filter:1, level:3, strategy:4, size:260490
filter:1, level:1, strategy:4, size:260568
filter:4, level:0, strategy:3, size:284075
filter:5, level:0, strategy:3, size:284320
filter:1, level:0, strategy:3, size:286960
filter:4, level:1, strategy:2, size:331440
filter:4, level:2, strategy:2, size:331440
filter:4, level:3, strategy:2, size:331440
filter:4, level:4, strategy:2, size:331440
filter:4, level:5, strategy:2, size:331440
filter:4, level:6, strategy:2, size:331440
filter:4, level:7, strategy:2, size:331440
filter:4, level:8, strategy:2, size:331440
filter:4, level:9, strategy:2, size:331440
filter:5, level:1, strategy:2, size:331550
filter:5, level:2, strategy:2, size:331550
filter:5, level:3, strategy:2, size:331550
filter:5, level:4, strategy:2, size:331550
filter:5, level:5, strategy:2, size:331550
filter:5, level:6, strategy:2, size:331550
filter:5, level:7, strategy:2, size:331550
filter:5, level:8, strategy:2, size:331550
filter:5, level:9, strategy:2, size:331550
filter:1, level:1, strategy:2, size:331823
filter:1, level:2, strategy:2, size:331823
filter:1, level:3, strategy:2, size:331823
filter:1, level:4, strategy:2, size:331823
filter:1, level:5, strategy:2, size:331823
filter:1, level:6, strategy:2, size:331823
filter:1, level:7, strategy:2, size:331823
filter:1, level:8, strategy:2, size:331823
filter:1, level:9, strategy:2, size:331823
filter:3, level:1, strategy:3, size:346952
filter:3, level:2, strategy:3, size:346952
filter:3, level:3, strategy:3, size:346952
filter:3, level:4, strategy:3, size:346952
filter:3, level:5, strategy:3, size:346952
filter:3, level:6, strategy:3, size:346952
filter:3, level:7, strategy:3, size:346952
filter:3, level:8, strategy:3, size:346952
filter:3, level:9, strategy:3, size:346952
filter:2, level:1, strategy:3, size:358276
filter:2, level:2, strategy:3, size:358276
filter:2, level:3, strategy:3, size:358276
filter:2, level:4, strategy:3, size:358276
filter:2, level:5, strategy:3, size:358276
filter:2, level:6, strategy:3, size:358276
filter:2, level:7, strategy:3, size:358276
filter:2, level:8, strategy:3, size:358276
filter:2, level:9, strategy:3, size:358276
filter:3, level:1, strategy:2, size:429431
filter:3, level:2, strategy:2, size:429431
filter:3, level:3, strategy:2, size:429431
filter:3, level:4, strategy:2, size:429431
filter:3, level:5, strategy:2, size:429431
filter:3, level:6, strategy:2, size:429431
filter:3, level:7, strategy:2, size:429431
filter:3, level:8, strategy:2, size:429431
...

这篇关于ImageMagick:PNG的无损最大压缩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 20:57