meteor-imagemagick
meteor-imagemagick copied to clipboard
No callback from resize/crop
Hi there, I am resizing/cropping in collectionFS fileHandler, and experiencing an issue when I resize/crop a file, it has no callback fired. Any idea?
It was a bug in the docs, there's no callback invoked since this lib has a synchronous API. Whenever crop() returns, that means that the operation completed.
Thank you. So is there I way I can use the output of the new cropped file? Not the one saved as file. I need the buffer actually. I tris to get the return value from crop() but looks like it is not an image buffer. Or I missed something?
You need to read the file Imagemagick written with fs.readFile.
Bottom line is, this lib is just calling Imagemagick with the correct arguments, it never manipulates the image data.
This is weird.
I have 2 crops before i'm adding to the database, and it adds to the database before the crops are done.