docs: public static byte[] toByteArray(final BufferedImage bi, final String formatName)
  		throws IOException
  	{
  		try (ByteArrayOutputStream baos = new ByteArrayOutputStream())
  		{
  			ImageIO.write(bi, formatName, baos);
  			baos.flush();
  			final byte[] byteArray = baos.toByteArray();
  			return byteArray;
  		}
  	}