When you use imagemagick module in macbook and get this error, then you can follow below steps.
var im = require('imagemagick');
im.resize({
srcPath: "/Users/mac/tmp/test/a.jpg",
destPath: "/Users/mac/tmp/test/a1.jpg",
width: 200,
height: 200,
quality: 0.8
}, function(error, stdout, stderror) {
if (error) {
console.error(error);
}
});
"Command failed: convert: unable to load module `/usr/local/Cellar/imagemagick/6.8.7-7/lib/ImageMagick//modules-Q16/coders/jpeg.la': file not found @ error/module.c/OpenModule/1277.
convert: no decode delegate for this image format `/Users/mac/tmp/test/test.jpg' @ error/constitute.c/ReadImage/555.
convert: no images defined `jpg:-' @ error/convert.c/ConvertImageCommand/3145.
"
brew update
brew doctor
brew uninstall imagemagick
brew uninstall libtool
brew install libtool ( --universal )
brew install imagemagick --build-from-source
reboot your mackbook!!!
test in console like this.
convert a.jpg a1.png
even thought you get the same error, then follow this.
ㅇ Fix for "convert: no decode delegate for this image format "
http://blog.ericlamb.net/2008/11/fix-for-convert-no-decode-delegate-for-this-image-format/
read this : http://www.imagemagick.org/download/delegates/README.txt
reboot your mackbook!!!
test again in console like this.
convert a.jpg a1.png
var im = require('imagemagick');
im.resize({
srcPath: "/Users/mac/tmp/test/a.jpg",
destPath: "/Users/mac/tmp/test/a1.jpg",
width: 200,
height: 200,
quality: 0.8
}, function(error, stdout, stderror) {
if (error) {
console.error(error);
}
});
"Command failed: convert: unable to load module `/usr/local/Cellar/imagemagick/6.8.7-7/lib/ImageMagick//modules-Q16/coders/jpeg.la': file not found @ error/module.c/OpenModule/1277.
convert: no decode delegate for this image format `/Users/mac/tmp/test/test.jpg' @ error/constitute.c/ReadImage/555.
convert: no images defined `jpg:-' @ error/convert.c/ConvertImageCommand/3145.
"
brew update
brew doctor
brew uninstall imagemagick
brew uninstall libtool
brew install libtool ( --universal )
brew install imagemagick --build-from-source
reboot your mackbook!!!
test in console like this.
convert a.jpg a1.png
even thought you get the same error, then follow this.
ㅇ Fix for "convert: no decode delegate for this image format "
http://blog.ericlamb.net/2008/11/fix-for-convert-no-decode-delegate-for-this-image-format/
read this : http://www.imagemagick.org/download/delegates/README.txt
reboot your mackbook!!!
test again in console like this.
convert a.jpg a1.png
Comments
Post a Comment