Hi! I tried out this code and my image still doesn't wanna be smaller!
what can i do?
GreenfootImage image = getImage();
image.scale(image.getWidth() - 150, image.getHeight() - 150);
setImage(image);


1 | System.out.println( "Width: " +image.getWidth()+ "\nHeight: " +image.getHeight()); |
1 | image.scale( 50 , 50 ); |
1 | image.scale(image.getWidth()- 150 , image.getHeight()- 150 ); |
1 | image.scale(image.getWidth()/ 2 , image.getHeight()/ 2 ); |
1 2 3 | GreenfootImage image = getImage(); image.scale(image.getWidth() - 150 , image.getHeight() - 150 ); setImage(image); |
1 | System.out.println( "Width: " +image.getWidth()+ "\nHeight: " +image.getHeight()); |