Hi Yurri,
Thanks for your help.
I had a look at the link but I'm still a little stuck and not sure where to start.
can you give me a few steps to implement this?
Thank you
Joe
Hi Yurri,
Thanks for your help.
I had a look at the link but I'm still a little stuck and not sure where to start.
can you give me a few steps to implement this?
Thank you
Joe
I'm going to post this as a separate thread as it is a separate question
Hi Joe,
Here is JS code how you can get image from first image, resize it and then put it source into another component:
precode
//Get img component. You should replace "mobileimage_1" with your img component name.
var img = Apperyio("mobileimage_152");
var width = img.width();
var height = img.height();
var newWidth = 30;
var newHeight = height / newWidth * width;
var canvas = jQuery('<canvas width="' + newWidth + '" height="' + newHeight + '"></canvas>');
var c = canvas[0];
var ctx = c.getContext("2d");
ctx.drawImage(img[0], 0, 0, newWidth, newHeight);
//Get base64String.
var base64String = c.toDataURL();
//Using base64String.
console.log(base64String);
//alert(base64String);
//Set this picture to other image component to be sure picture is ok.
Apperyio("mobileimage_154").attr("src", base64String);
/code/pre
Regards.
Thank you Yurii this really helped, sorry for my late response to this.