Separate resizing and formatting BufferedImage