Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.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
Rotation 通过ImageMagick旋转PNG_Rotation_Imagemagick_Transparent - Fatal编程技术网

Rotation 通过ImageMagick旋转PNG

Rotation 通过ImageMagick旋转PNG,rotation,imagemagick,transparent,Rotation,Imagemagick,Transparent,我想通过convert命令旋转PNG文件。 像这样 convert -background 'rgba(0,0,0,0.5)' -rotate 45 1.png r1.png 但结果PNG文件是错误的,如下所示。 灰色空间是正确的 我不知道为什么会有黑空间 我怎么了 多谢各位 转换版本 版本:ImageMagick 6.5.4-7 2012-05-07 Q16 OpenMP 版权所有:版权所有(C)1999-2009 ImageMagick Studio LLC要修改的图像在转换后直接出现

我想通过convert命令旋转PNG文件。 像这样

convert -background 'rgba(0,0,0,0.5)' -rotate 45 1.png r1.png
但结果PNG文件是错误的,如下所示。

灰色空间是正确的

我不知道为什么会有黑空间

我怎么了

多谢各位


转换版本 版本:ImageMagick 6.5.4-7 2012-05-07 Q16 OpenMP
版权所有:版权所有(C)1999-2009 ImageMagick Studio LLC

要修改的图像在转换后直接出现

尝试:

这对我有用

$ convert 1.png -distort SRT -ANGLE_IN_DEGREES -gravity center r1.png

我使用的是版本“ImageMagick 6.5.4-7 2012-05-07”。我是通过yum安装的。操作系统是CentOS 6.2,我可以正确地旋转它!!我从源代码处安装了最新版本的ImageMagick(6.8.0-7)。谢谢;)在过去的一年里,Imagemagick中的png函数发生了一些变化。很高兴它现在已经分类了。
$ convert 1.png -distort SRT -ANGLE_IN_DEGREES -gravity center r1.png