Closed amobrem closed 9 years ago
@amobrem I am looking into a couple of options. The problem with Imagemagick and node-canvas is that they have additional dependencies as described here: https://github.com/LearnBoost/node-canvas/wiki/_pages.
And when you deploy your application to the server, you will need to do the same setup there and on most of the public hostings this may be an issue.
I am presently evaluating https://www.npmjs.org/package/image-resizer. Feel free to suggest.
Thanks, Arvind.
As I mentionned in your blog, I find it annoying that the original file gets copied in thumbnails folder.
https://github.com/blueimp/jQuery-File-Upload/wiki/Client-side-Image-Resizing
The client code provides client-side image resizing support without Imagemagick or Cairo. I think the file is used by the client side script as a thumbnail while the file is in the "waiting room" before send button gets pushed.
Maybe we could just upload the thumbnail generated in the same time as the original file ?
@mycaule let me give that a shot..
http://stackoverflow.com/questions/2434458/image-resizing-client-side-with-javascript-before-upload-to-the-server
With modern browsers, thanks to HTML5 <canvas>
element it is possible to resize an image client-side.
Yup, that is true. As of now the logic is to create the thumbnail on the server. I might need to tweak the server side code as well.
lwip
has C++ dependencies...
From https://www.npmjs.com/package/lwip :
Note: Installation of this module involves compiling native code. If npm install lwip fails, you probably need to setup your system. See instructions. Building on Windows with Visual Studio requires version 2013 or higher.
@mycaule True. But this seems to be the only sanest module out there! :/
Have you looked at GraphicsMagick? It's a fork of ImageMagick and it claims to be "much smaller and tighter (3-5X smaller installation footprint)".
Yeah, but the process to setup is very tedious. Its not very "npm-iy". So did not pick that. FYI : http://aheckmann.github.io/gm
but you need to setup GraphicsMagick or ImageMagick on your machine first before you start using them in Nodejs.
In Linux, the setup is just apt-get install graphicsmagick
and 8MB of space.
lwip
needs the same space for the binaries it's building, but you need to have or setup a C++ dev environment before (especially on Windows machines).
I agree however that this is too much just to resize an image...
When will this be ready? Can you implement it with node-canvas?
Thanks