arvindr21 / blueimp-file-upload-expressjs

A simple express module for integrating jQuery File Upload.
http://expressjs-fileupload.cloudno.de/
104 stars 69 forks source link

The aspect ratio is broken when resizing #29

Open jselesan opened 9 years ago

jselesan commented 9 years ago

I'm using file-upload on my express.js application to upload user profile pictures. The profile picture is 144x144, so I put these dimensions on the options, but the picture I get is not cropped to preserve aspect radio, and it looks ugly. Is there a way to crop instead of resize?

arvindr21 commented 9 years ago

As of now no. BTW, I am uisng lwip to resize images. You can fork the repo and modify resize with crop if you want. -- Thanks.

mycaule commented 9 years ago

These two freemium cloud services seem interesting for remote storing and performing image operations. They also provide a REST API for the operations mentioned.

mycaule commented 9 years ago

If the goal is to make a cloudinary clone, this page might help. http://cloudinary.com/documentation/node_image_upload

The API is very well designed and documented.

arvindr21 commented 9 years ago

We cannot rely on it for resize as uptime may not be guaranteed. Not sure if someone would like to take that risk in production.

mycaule commented 9 years ago

If the objective is to do a basic backend service for file storage and image processing --which is the kind of thing that cloudinary (images) or transloadit (images, videos, documents) does.

Good ideas can be taken from their design and how they present things to the end users and developers.

All these cloud services rely on Amazon instances or similar, it's not a matter of uptime but rather of data confidentiality. Groups or companies might want to keep files on their servers, which is why this package could be interesting.

cm-rayalab commented 9 years ago

you should not write on your npm webpage that image resize supports automatic height when is not working, please update and remove it from the page.

arvindr21 commented 9 years ago

@cm-rayalab can you do anything to help us fix that?

karan-kapoor90 commented 9 years ago

@arvindr21, any update on this please? This library you've created is really quite good! This resize thing seems to be the only remaining chunk in the armor.

arvindr21 commented 9 years ago

I guess that issue was fixed with this PR: https://github.com/arvindr21/blueimp-file-upload-expressjs/pull/40 and should be in the latest NPM release

mycaule commented 7 years ago

Here is the current techniques for lightweight image processing: https://pusher.com/sessions/meetup/js-monthly-london/image-processing-and-manipulation-in-nodejs