I'm attempting to use graphicsmagick with imagemagick to resize some jpg and png images. The png images work great, but anytime a jpg image is downloaded or saved i get an error.
I am running this on a windows 8.1, and i've installed ImageMagick and GraphicsMagick using the ImageMagick-6.9.1-10-Q16-x64-dll.exe and GraphicsMagick-1.3.21-Q16-win64-dll.exe through node.js.
Thanks in advance!
Command Prompt:
Error: Command failed: convert.exe: Wrong JPEG library version: library is 90, caller expects 80 C:\Users\user\Pictures\testA.jpg @ error/jpeg.c/JPEGErrorHandler/322.convert.exe: no images defined C:\Users\user\Pictures\testB.jpg @error/convert.c/ConvertImageCommand/3230.
Code:
gm('C:\\Users\\user\\Pictures\\testA.jpg')
.resize(640, '>')
.write('C:\\Users\\user\\Pictures\\testB.jpg', function(error){
if(!error){
console.log('Success')
}else{
console.log(error)
}
答案 0 :(得分:1)
您同时安装了libjpeg 8.0和9.0版。 ImageMagick从一个查找头文件,从另一个查找可执行文件。你需要找到libjpeg-8.0,卸载它,然后重新安装ImageMagick和GraphicsMagick。