Display.loadremoteimage Image Size

How can i change the download image size (the height and width ) when show it ?

 

Is it possible ? :frowning:

 

Thanks

@gnguoning, I use event.target.xScale and  event.target.yScale in my code.

 

Naomi

ah~~~

I see

 

Assign values for instance  image.width = 100 /  image.height = 100

Naomi

 

when i use  event.target.xScale   and then i print(event.target.height/width)  the value no change ~~~

Hmmm… I don’t think xScale and yScale would actually change the value of the height & width.   From what I understand, all it does is to change scaling factor applied to display object.  Just like… say, you have an image.png file that is 100x100, setting xScale and yScale to 0.5 wouldn’t change the actually size of the image, but it could be displayed at 50x50 on screen.  At least that’s how I use it.

 

Naomi

Naomi  thanks very much! :slight_smile:

@gnguoning, I use event.target.xScale and  event.target.yScale in my code.

 

Naomi

ah~~~

I see

 

Assign values for instance  image.width = 100 /  image.height = 100

Naomi

 

when i use  event.target.xScale   and then i print(event.target.height/width)  the value no change ~~~

Hmmm… I don’t think xScale and yScale would actually change the value of the height & width.   From what I understand, all it does is to change scaling factor applied to display object.  Just like… say, you have an image.png file that is 100x100, setting xScale and yScale to 0.5 wouldn’t change the actually size of the image, but it could be displayed at 50x50 on screen.  At least that’s how I use it.

 

Naomi

Naomi  thanks very much! :slight_smile: