parse-image
parse-image copied to clipboard
no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
Thanks for creating this repo. But I wonder if any delegate of imagemagick has to be installed? I encountered the caption error when executing setData.
Parse.Cloud.httpRequest({ url: url }).then(function(response) {
// Create an Image from the data.
var image = new Image();
return image.setData(response.buffer);
);
@mchun what platform/system are you running on?
mac osx 10.10.5 when I do "convert -list configure" It contains the following, I have no idea what went wrong and currently using jimp instead. DELEGATES bzlib mpeg freetype jng jpeg lzma png tiff webp xml zlib
I'm on 10.11.3 and that works like a breeze, on travis the tests passes too.. that's really odd. Seems a mis installation of the couple gm/imagemagick
This is encoding problem. Parse.Cloud.httpRequest is using request.
encoding - Encoding to be used on setEncoding of response data. If null, the body is returned as a Buffer. Anything else (including the default value of undefined) will be passed as the encoding parameter to toString() (meaning this is effectively utf8 by default). (Note: if you expect binary data, you should set encoding: null.)
Set encoding to null can solve the problem for me.
Parse.Cloud.httpRequest({ url: url, encoding: null}).then(function(response) {
// Create an Image from the data.
var image = new Image();
return image.setData(response.buffer);
);
Good catch! Do you have time for a Pr?
Saw your PR in parse-server for this issues. Thanks a lot and appreciate for your work!
Hi @flovilmart, Thanks for doing this. I am getting the same error too when trying to download an image from a url using httpRequest. I even tried using encoding = null
but still doesn't work. Can you please let me know how I should work around this error.
can you try without using Parse.Cloud.httpRequest but a simple http request manager and see if it works passing the response buffer to ParseImage
Ive tried two different request clients here and am still getting the same error. Is this something that is occuring across all file adapters or could it be provider specific?
I'm not sure. where is it deployed? heroku?
Im running it locally on 10.10.5
uhm, never had that issue on mac...
both graphmagick and imagemagick are installed via homebrew, is there something I can check to confirm with confirm -list configure
Can you try cloning the repo and run the tests? With npm run tests?
Got 8 passing here, must be something with the response that I am passing.
yup that's most likely, make sure that's a proper buffer with an image in it :)
Where do you suggest posting to verify a FileAdapter? I have one written for RackSpace but would like to make sure its conformant to parse-server
try locally with your code to save the buffer as a file.