Hi Edward,
Yes you can specify the landscape/portrait image dimension when using the JavaScript API.
The size.width and size.height properties have sub-properties "portrait" and "landscape".
You can specify both portrait and landscape value, or just either one (portrait or landscape, in which case the value of the other orientation will be derived).
Code: Select all
opts.size = { width: {landscape: "640"}, height: {landscape: "480"} };
The code above indicates that images should be resized to 640x480 when they are in landscape, and 480x640 when in portrait
The code below indicates that images should be resized to 300x200 for landscape, and 150x250 for portrait:
Code: Select all
opts.size = { width: {landscape: "300", portrait: "150"}, height: {landscape: "200", portrait: "250"} };
I'll also send you an updated JavaScript API guide that contains these properties.