I'm making an image editing software in java and need to resize the images so that users can edit images pixel by pixel. However, whenever I use image.getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH); the image loses its transparency. All the image files I use are png's. How do I resize an image without losing transparency?