Nel framework di Java SE c'è principalmente il getScaledInstance di java.awt.Image.
E da quanto rileggo ora ha una logica del tipo: If either width or height is a negative number then a value is substituted to maintain the aspect ratio of the original image dimensions.
Quindi può fare i casi che chiedi.