Node.js ImageMagick & GM both cause error 127 when trying to load a valid image -
i have node app accepts uploaded image (using formidable) , stores amazon s3 bucket. before saved s3, want image's width, height, etc. future consideration. found question helped: opening images on nodejs , finding out width/height
however, when try open image imagemagick (or gm, matter, i've tried both) error 127. specifically, imagemagick reports:
{"timedout":false,"killed":false,"code":127,"signal":null} i know file exists (because uploaded s3 bucket), , can manipulate (eg, rename) via fs, cannot find documentation on error code 127 determine why im fails. thinking perhaps there odd file uploaded formidable causing not read properly, tried using imagemagick load simple "test.jpg" image in same folder:
im.identify('test.jpg', function(err, features){ if(!err) { // image processing code } else { // err handling code; spits out error above } }); unfortunately, fails in exact same manner, though i'm sure test.jpg , formatted image.
so, can me understand error 127 , why imagemagick throw when fs able read file fine...?
these couple of php commands find path imagemagick should confirm installed. in php there problem using convert , need use full path; /usr/local/bin/convert
echo "<pre>"; system("type convert"); system('which convert',$path); print_r($path); echo "</pre>"; i know not using php should still able use methods.
Comments
Post a Comment