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

The aspect ratio is broken when resizing #29

Open
jselesan opened this issue Dec 17, 2014 · 10 comments
Open

The aspect ratio is broken when resizing #29

jselesan opened this issue Dec 17, 2014 · 10 comments

Comments

@jselesan
Copy link

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
Copy link
Owner

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
Copy link
Collaborator

mycaule commented Dec 27, 2014

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
Copy link
Collaborator

mycaule commented Dec 29, 2014

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
Copy link
Owner

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
Copy link
Collaborator

mycaule commented Dec 30, 2014

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
Copy link

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
Copy link
Owner

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

@karan-kapoor90
Copy link

@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
Copy link
Owner

I guess that issue was fixed with this PR: #40 and should be in the latest NPM release

@mycaule
Copy link
Collaborator

mycaule commented Feb 3, 2017

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

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

No branches or pull requests

5 participants