-
Notifications
You must be signed in to change notification settings - Fork 9
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
Created File After Convert #1
Comments
The thing is that this package just calls the imagemagick executable on your machine, it can only work with actual files on the filesystem. So using an URL is not correct. (even though I will take a look at why there's no error thrown) My advice would be to save your image to a temp folder, then processing it with Imagemagick. |
@sylvaingi thanks for the quick response. It makes sense that using an URL is incorrect. I have decided to save the image in my meteor public folder then use the convert command on it. I can access the image saved in the public directory like: var image = ../../../../../public/mac.png |
Be careful with the file path of the public/ folder, I think it is not consistent whether you are in development or production (meteor deploy or bundle). |
The problem is resolved locally. However where is the public/folder path in the deployed meteor project path? |
I think it is something like programs/client/app/, but I am not sure it is a best practice to reference this directory. You shoud consider using the Assets API: http://docs.meteor.com/#assets |
Thanks for all the help, I will look into using and implementing assests. After investigation I have found this excerpt from the meteor documentation: Since I want to have these images accessible to the client, I cannot use the Assests API. So I guess I will stick with the public folder. |
@nspangler Unfortunately, writing in the public folder will cause the reboot of meteor! (also in production) but now is tunerd out another problem with imagemagick crop function! I don't understand how I can debug it! :-( |
I'm really enjoying meteor-imagemagick. It is very useful in my image processing meteor application. However I am having a trouble using the Imagemagick.convert command.
In my application I read in a file from a url then after the image is processed I need to save it. I have been using meteor-imagemagick along side collectionFS (https://github.com/CollectionFS/Meteor-CollectionFS). The Imagemagick.resize and .crop have been working perfectly for me. However I want to use the convert -brightness-contrast feature that imagemagick offers to brighten up a dark photo.
I use the command as proposed in the readme from inside a collectionFS filehandler.
My code:
var image = "http://localhost:3000/cfs/contacts/sQnQPyGLfez2tY498_default1.jpg";
Imagemagick.convert([image, '-brightness-contrast', '+50', 'image-bright.jpg']);
However I don't understand where the file is being stored once being manipulated by imagemagick. Maybe it's not being saved?
Thanks for the help.
The text was updated successfully, but these errors were encountered: