-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
width/height auto not supported? #1124
Comments
It would always keep the aspect ratio of the image so the image will not be distorted. So you can set the width and height so it would fit the picture in that box adding empty borders if necessary. |
I done a ton of picture related projects and they usuallly want a fixed size in the wrapper, so what you do because uploaded images all have different sizes is that you go for widh or height as the determinator and you let the not fitting part, to just be invisible outside that box. So you will need "auto" feature, I usually program this directly before passing down to image-magic. But I would prefer to start to us ng-file-upload with auto supported. Don't get me wrong, I am not beeing negative on your project, but width or height auto, is a common wanted feature in what you have. Why not something like this in the "resize" function: |
What you are describing here is doable by setting a large value to either width or height to make them auto. |
Fixed at 10.0.0, you can leave any of the width and height empty for the same effect. |
Well, I tried this out today and it was really easy to get started. But I can't see how to do width/height:auto, because in almost all cases you never resize an image to fixed sizes on both width and height because then you are probably ending up with a messed up picture, you use one as the reference and the other one is "auto", you never know what ratio the users will have.
This would be very appreciated:
ngf-resize="{width: 100, height: 'auto'}" or just ngf-resize="{width: 100}" and auto as default if width or height is not given.
The text was updated successfully, but these errors were encountered: