Answer the question
In order to leave comments, you need to log in
Image scaling to one width with different height?
How to change the width of images in the application feed to a certain width, while maintaining proportions, and leaving the height "dynamic".
For example, I need to compress a 1920x1280 image to a 455px width without a height parameter. You should get an image with a resolution of 455x256 ( width x height ).
In the same feed, there may be an image with a different resolution of 750x1334 - the width is compressed to 455 and it should be 455x809.
Here is an example of how it will look in the feed:
How can I make a certain width, but leave a dynamic height while maintaining proportions.
Answer the question
In order to leave comments, you need to log in
You take the width & height of the image, newWidth = 455; newHeight = newWidth * height / width.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question