Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No callback from resize/crop #3

Open
ghost opened this issue Mar 18, 2014 · 4 comments
Open

No callback from resize/crop #3

ghost opened this issue Mar 18, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Mar 18, 2014

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?

@sylvaingi
Copy link
Owner

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.

@ghost
Copy link
Author

ghost commented Mar 18, 2014

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?

@sylvaingi
Copy link
Owner

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.

@rafaelfaria
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants