0

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)
                }

1 Answers1

1

You have both libjpeg version 8.0 and version 9.0 installed. ImageMagick is finding the header files from one and the executable files from the other. You neeed to find libjpeg-8.0, uninstall it, then reinstall ImageMagick and GraphicsMagick.

Glenn Randers-Pehrson
  • 11,940
  • 3
  • 37
  • 61
  • Thank you this has shed some light on it. I had actually installed libjpeg-turbo. Do you suggest i reinstall libjpeg turb, imagemagick, and graphicksmagick, or should i go with libjpeg-8.0? – cluelessCoder Jul 31 '15 at 21:29
  • sidenote: i did not have these issues when using libjpeg-turbo originally, it was only when i started adding several other image related packages that it started going screwy – cluelessCoder Jul 31 '15 at 21:30
  • Libjpeg-turbo (which is a fork of libjpeg) - should work, too. But you should have only one of 8.0 and 9.0. The current version of IJG software is libjpeg-9a. Libjpeg-turbo is a fork of IJG's libjpeg-8d. – Glenn Randers-Pehrson Jul 31 '15 at 22:26
  • The libjpeg-turbo fork occurred earlier, according to https://en.wikipedia.org/wiki/Libjpeg maybe from version 6b. There are claims that -turbo is 3 to 5 times as fast as the IJG libjpeg. – Glenn Randers-Pehrson Jul 31 '15 at 22:34