Azhrei wrote:
Or specify only one of width or height and the other will default to be whatever is correct in order for the aspect ratio to be maintained.
I've been trying to do this but either I misunderstand what you mean, or I'm not doing it right.
If you specify the width of images to always be 640 and don't set the height, and then you import an 800x600 image, should it appear as 640x480 so the height maintains its aspect ratio when the width goes from 800 down to 640? Or is that not what you meant?
When I set just the height on my macro to be height=722 and I don't put a width, it sizes the image to 722 but it still keeps the original width (so the image skews). It does not scale the width down to keep the aspect ratio correct. Sorry if I misunderstood what you meant.
Even if that was possible, I guess it would only be helpful for larger images since it would scale smaller images up and make them pixalized.
Here is my code:
Code:
[H: abort(input("Image | " + json.toList(getLibProperty("ImageList")) + " | Select image | LIST | VALUE=STRING"))]
[dialog("ImageViewer", "height=750; width=1340; temporary=1; input=0; noframe=1"): { <html><center><image src="[R: getImage(Image)]"height=722> }]