I am not certain that the 'turn90' static method can actually change the dimensions of a BufferedImage. In other words, the dimensions of 'bi' cannot be changed as far as I can tell. As a GreenfootImage object, you can change the BufferedImage that backs it, allowing the size to change; but, once a BufferedImage object is created, I do not believe it is possible to alter its dimensions. So, for that method to work as you intended, you must return a new BuffferedImage object with the turned image and the calling statement must replace the reference to point to the new object. In other words, instead of calling the method like this:
you need to do something like this:
where the declaration line of 'turn90' is:
1 | Processor.turn90(bi); // where 'bi points to a BufferedImage object |
1 | bi = Processor.turn90(bi); |
1 | public static BufferedImage turn90(BufferedImage bi) |