code: public byte[] getImageBytes(BufferedImage image) {
  		byte[] bytes = null;
  		try {
  			bytes = ImageUtils.writeImageToBytes(image,
  					ImageUtils.IMAGE_FORMAT_PNG);
  		} catch (IOException e) {
  			throw new GeoPackageException("Failed to write image to "
  					+ ImageUtils.IMAGE_FORMAT_PNG + " bytes", e);
  		}
  		return bytes;
  	}
docs: Get the image as PNG bytes
  
  @param image
  buffered image
  @return image bytes