convert

1、关闭alpha通道:

convert source.png -alpha off dest.png

2、生成遮罩图:

convert moon.png  -alpha extract    alpha_extract.png

 

测试:

1、原始, 195.997M
2、一个png转为两个png,其中一个大图未选择压缩,max size4096。 198.270M
3、一个png转为两个png,选择压缩,max size4096。 194.509M
4、一个png转为两个png,选择压缩,max size修改为2048。 没有任何变化,连生成的大小都是相同的。
5、两个png使用pngquant压缩后再试。max size 2048。   194.522M 晕,竟然还变大了。
6、两个jpg。使用tinyjpg压缩。我CAAAAAAAAAAAAAO,竟然是201.184,竟然还变大了。(发现,自动选择的是true color,没有选择compress)
7、两个jpg。使用tinyjpg压缩。都选择上compress。194.798M。

最好的方式应该是不压缩的png选择compress。估计unity内部自己也有优化。



pngquant压缩后大小和tinypng压缩后大小差不多。
tinyjpg也很有用。压缩比也很高。
发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


Warning: Use of undefined constant XML - assumed 'XML' (this will throw an Error in a future version of PHP) in /opt/wordpress/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1048