This is not an insignificant thing to do. Whole TOOLS are written just to be able to transform images nicely. You don't mention what format you want to work with. Perhaps you should look at the Java Advanced Imaging. They have an example of scaling an image on their Java Image Visualization Page.
"JavaRanch, where the deer and the Certified play" - David O'Meara