Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image processing Imagemagick“;mogrify-strip";-改变形象?_Image Processing_Imagemagick - Fatal编程技术网

Image processing Imagemagick“;mogrify-strip";-改变形象?

Image processing Imagemagick“;mogrify-strip";-改变形象?,image-processing,imagemagick,Image Processing,Imagemagick,在my中,我询问了转换和位深度: 因此,这样做: $ convert in.png out.eps $ convert out.eps out.png $ identify in.png out.eps out.png in.png PNG 300x300 300x300+0+0 16-bit sRGB 1.65KB 0.000u 0:00.000 out.eps[1] PS 300x300 300x300+0+0 16-bit sRGB 1.42KB 0.000u 0:00.009 out.p

在my中,我询问了转换和位深度:

因此,这样做:

$ convert in.png out.eps
$ convert out.eps out.png
$ identify in.png out.eps out.png
in.png PNG 300x300 300x300+0+0 16-bit sRGB 1.65KB 0.000u 0:00.000
out.eps[1] PS 300x300 300x300+0+0 16-bit sRGB 1.42KB 0.000u 0:00.009
out.png[2] PNG 300x300 300x300+0+0 8-bit sRGB 4c 518B 0.000u 0:00.000
所以,深度不对。输入图像为16位。eps的<代码>为16位。输出png(来自eps)为8位

根据答案,尝试下一步:

$ convert out.eps -depth 16 PNG48:out2.png
$ identify out2.png 
out2.png PNG 300x300 300x300+0+0 16-bit sRGB 1.86KB 0.000u 0:00.000
有16位png。太好了

现在剥离元数据

$ mogrify -strip out2.png 
$ identify out2.png 
out2.png PNG 300x300 300x300+0+0 8-bit sRGB 4c 321B 0.000u 0:00.000
问题:为什么
-strip
会更改图像格式?它应该只剥离元数据。还是不

-剥离原始图像时:

$ mogrify -strip in.png 
$ identify in.png 
in.png PNG 300x300 300x300+0+0 16-bit sRGB 1.65KB 0.000u 0:00.000
-rw-r--r--   1 jm  staff    1645 10 júl 21:49 in.png
图像格式未更改

另一个奇怪的事情是图像的大小。原始图像:

$ mogrify -strip in.png 
$ identify in.png 
in.png PNG 300x300 300x300+0+0 16-bit sRGB 1.65KB 0.000u 0:00.000
-rw-r--r--   1 jm  staff    1645 10 júl 21:49 in.png
转换后的图像只有:

-rw-r--r--   1 jm  staff     321 10 júl 21:45 out2.png

所以,某个地方出了问题。也许是在转化过程中,或者是和莫格里菲一起。。。或大学教师;我不知道;(

您好,很抱歉迟到了,但是:标识查看元数据:16位。删除元数据:查看真实位:8位?详细信息:肯定会有帮助