我在一个AWS EC2实例上得到以下错误(我特别指出,因为我在Mac上没有此问题):
Error: Command failed: gm convert: No decode delegate for this image format (/tmp/5c5830319d29e4678e8691cd-1549705844271.jpg)
该文件确实存在,以防出现可疑情况。
我的配置
转基因
如下:
[mw-user@mwServer ~]$ gm version
GraphicsMagick 1.3.31 2018-11-17 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2018 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
Native Thread Safe yes
Large Files (> 32 bit) yes
Large Memory (> 32 bit) yes
BZIP no
DPS no
FlashPix no
FreeType no
Ghostscript (Library) no
JBIG no
JPEG-2000 no
JPEG no
Little CMS no
Loadable Modules no
OpenMP yes (201511)
PNG no
TIFF no
TRIO no
UMEM no
WebP no
WMF no
X11 no
XML no
ZLIB yes
Host type: x86_64-pc-linux-gnu
Configured using the command:
./configure
Final Build Parameters:
CC = gcc
CFLAGS = -fopenmp -g -O2 -Wall -pthread
CPPFLAGS =
CXX = g++
CXXFLAGS = -pthread
LDFLAGS =
LIBS = -lz -lm -lpthread
我正在使用节点模块:
var gm = require('gm');
gm("/tmp/5c5830319d29e4678e8691cd-1549705844271.jpg")
.resize(450, null)
.write("/tmp/5c5830319d29e4678e8691cd-1549705844271-Resized.jpg", (function(err){
if (err) {
console.log(err);
}
}));
我对通用汽车的了解还不够,从这儿到哪儿都去不了。问题似乎是我没有jpeg的“转换器”。问题是-如何设置它以支持大多数图像格式,如:JPG、PNG等?
事先谢谢!