The code as shown in the question creates an empty BufferedImage
, and PNG format encodes empty images pretty effectively.
You probably intended it to contain a copy of the original image:
BufferedImage bufferedImage = new BufferedImage(image.getWidth(null),
image.getHeight(null), BufferedImage.TYPE_INT_ARGB);
Graphics graphics = bufferedImage.getGraphics();
graphics.drawImage( image, 0, 0, null);
graphics.dispose();