What would be the best way to resize images, which can be any size, to a fixed size, or at least for a fixed size?
Images come from random URLs that are not under my control, and I have to ensure that the images do not go out from around 250 pixels x 300 pixels or 20% to 50% of the layer.
I would think that I first determine the size, and if it falls outside the range, change its size, but I'm not sure how to work out the logic for resizing if the image size can be anything.
edit: I do not have local access to the image, and the image URL in variable c is displayed using img src = ..., I need to specify the values ββof the width and height tags.
source share