This site requires JavaScript, please enable it in your browser!
Greenfoot back
Unomas
Unomas wrote ...

2020/6/3

How to resize an image from the internet

Unomas Unomas

2020/6/3

#
I took an image off of the internet and I want to make it so that it is not taking up the whole screen.
danpost danpost

2020/6/3

#
Unomas wrote...
I took an image off of the internet and I want to make it so that it is not taking up the whole screen.
Use the GreenfootImage instance method scale to make it the size you want.
Unomas Unomas

2020/6/3

#
could u share an example code so I could see what it looks like. Thanks!
danpost danpost

2020/6/3

#
Unomas wrote...
could u share an example code so I could see what it looks like. Thanks!
GreenfootImage img = new GreenfootImage("image.png");
img.scale(200, 200);
Unomas Unomas

2020/6/3

#
ok thank you!
You need to login to post a reply.