Find the dimensions of an uploaded image on outsystems 11
Question

Hi All,


I am trying to find a forge component or a way to find the width and height of an uploaded image, all previous posts on this topic mention the ImageToolBox but that is not compatible with version 11, so just wondered what the alternative is?


Many Thanks

Daniel Sunner 

Hi Daniel,


The best choice is ImageToolbox component, but sadly it has no update for O11. Did you check File upload and preview?


Regards,

Swatantra


var tmpImg = new Image();
tmpImg.src=$parameters.ImageURL; //or document.images[i].src;
$(tmpImg).one('load',function(){
orgWidth = tmpImg.width;
orgHeight = tmpImg.height;
console.log(orgWidth+"x"+orgHeight);


$parameters.imageDimension = orgWidth+"x"+orgHeight;
});



You can use this script on Button Click

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.