【发布时间】:2016-04-05 09:13:46
【问题描述】:
我正在使用 GraphicsMagick 来修改图像。它在 Windows 上运行良好,但是当我尝试在 ubuntu 上运行它时,它给了我一个错误
无法识别的虚拟像素法(透明)。
下面是我正在使用的命令
gm convert newImages/December31201542014pm3630/profileLarge.jpg -background transparent -rotate -2 -matte -virtual-pixel transparent -distort Perspective \"0,0 0,0 213,0 213,20 213,160 213,165 0,80 0,80 \" newImages/December31201542014pm3630/skew_profile.png
【问题讨论】:
-
不知道是什么原因,但你可以试试
-virtual-pixel none作为同义词,或者,因为你的背景是透明的,你可以试试-virtual-pixel background。另外,请尝试在加载初始图像后立即添加-matte以创建 alpha 层,因为 JPEG 自然不会有一个。
标签: node.js image-processing imagemagick graphicsmagick node-imagemagick