gm パッケージを使用すると奇妙なエラーが発生します。Windows x86 で作業しています。すでにgmとimagemagickをインストールしました。
これは私のコードです:
function convert(response, next) {
console.time("convertImage");
console.log("Reponse content type : " + response.ContentType);
console.log("Conversion");
GM(response.Body, fullName).setFormat('jpeg').antialias(true).density(300).toBuffer(
function(err, buffer) {
if (err) {
next(err);
} else {
console.timeEnd("convertImage");
next(null, buffer);
}
});
}
これは私が得るエラーです:
Debug: internal, implementation, error
Error: Command failed: identify.exe: no decode delegate for this image forma
t `' @ error/constitute.c/ReadImage/501.
at ChildProcess.proc.on.onExit (d:\node.js\ImageUploaderWorker\node_modules\
gm\lib\command.js:297:17)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
I can't understand what is my problem.
$ convert --version
Version: ImageMagick 6.9.3-8 Q16 x86 2016-04-10 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangoca
iro png ps rsvg tiff webp xml zlib