This function resizes the picture, if necessary, according to the maxWidth and maxHeight, given to the
This function should only be called if isPicture is true. Otherwise, an exception is raised.
Note (Update given by David Gnedt): the highquality will condition the call of getScaledInstance, instead of a
basic scale Transformation. The generated picture is of better quality, but this is longer, especially on 'small'
CPU. Time samples, with one picture from my canon EOS20D, on a PII 500M:
~3s for the full screen preview with highquality to false, and a quarter rotation. 12s to 20s with highquality to
~5s for the first (small) preview of the picture, with both highquality to false or true.
highquality - (added by David Gnedt): if set to true, the BufferedImage.getScaledInstance() is called. This
generates better image, but consumes more CPU.
sourceBufferedImage - The image to resize or rotate or both or no tranformation...
A BufferedImage which contains the picture according to current parameters (resizing, rotation...), or
null if this is not a picture.