| This suggestion wouldn't work too well for an exam, but simply to figure out what is going on at your leisure, what you can do is try the function out with different input values of ratio. Then mutate the code a bit here and there. To see whether the cropping and scaling are done where you think they are, change the numbers in the code systematically and see what the effects are on the resulting image. You can't damage anything by editing the program – it's not a chemistry lab – so experiment. Colin Potts |