有一个in.png。现在做下一个:
$ convert in.png -strip out.tiff #convert to tiff
$ convert out.tiff -strip out.png #and back
$ cmp in.png out.png
$#no output - the images has no difference - theyre same
$ identify in.png out.png
in.png PNG 300x300 300x300+0+0 16-bit sRGB 1.65KB 0.000u 0:00.000
out.png[1] PNG 300x300 300x300+0+0 16-bit sRGB 1.65KB 0.000u 0:00.000现在通过eps来尝试这个。所以:
$ convert in.png -strip out2.eps #convert to eps
$ convert out2.eps -strip out2.png #back而且图像是不同的。
$ identify in.png out.png out2.png
in.png PNG 300x300 300x300+0+0 16-bit sRGB 1.65KB 0.000u 0:00.000
out.png[1] PNG 300x300 300x300+0+0 16-bit sRGB 1.65KB 0.000u 0:00.000
out2.png[2] PNG 300x300 300x300+0+0 8-bit sRGB 4c 321B 0.000u 0:00.009如您所见,转换-> png创建8位png.
好奇加- EPS是16位!
$ identify out2.eps
out2.eps PS 300x300 300x300+0+0 16-bit sRGB 1.42KB 0.000u 0:00.000问题:
eps->png转换会改变位深度?编辑
Tested @Rachel建议:
$ convert out2.eps -depth 16 out3.png
$ identify out3.png
out3.png PNG 300x300 300x300+0+0 8-bit sRGB 4c 518B 0.000u 0:00.000再吃八口。
我的ImageMagick版本:
$ convert --version
Version: ImageMagick 6.8.9-1 Q16 x86_64 2014-06-01 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib djvu fftw fontconfig freetype gslib gvc jng jp2 jpeg lcms ltdl lzma pangocairo png ps tiff webp wmf x xml zlib如果有人想要测试,这是我的测试图像:

最终
马克·塞切尔和蕾切尔·盖伦的推荐都很好。@Marks命令工作,所以关键是PNG48。
$ convert out2.eps -depth 16 PNG48:out7.png
$ identify out7.png
out7.png PNG 300x300 300x300+0+0 16-bit sRGB 1.86KB 0.000u 0:00.000终于16位png了.我将如何在另一个问题上问,为什么下一个:
$ mogrify -strip out7.png
$ identify out7.png
out7.png PNG 300x300 300x300+0+0 8-bit sRGB 4c 321B 0.000u 0:00.000再吃八口。而且-strip应该只删除元数据,并且而不是应该改变图像本身。
发布于 2014-07-10 18:54:00
我想你需要一些类似的东西才能得到16位的PNGs
convert a.png -depth 16 PNG48:b.png发布于 2014-07-10 19:07:25
我认为通过查看文档你可以做到
convert -depth 16 image.eps image2.png[16]语法是
convert [ options … ] file [file …] file本站说,“使用文件名后面括号中的可选索引来指定所需的多分辨率图像格式的子图像,如Photo CD (例如in 0001.pcd4)或MPEG图像的范围(例如.MPEG 50-75)。”
所以也许在图片2之后放16
https://stackoverflow.com/questions/24683912
复制相似问题