+ return fromImage(image, null);
+ }
+
+ /**
+ * Convert the given {@link Image} object into a Base64 representation of
+ * the same {@link Image}. object.
+ *
+ * @param image
+ * the {@link Image} object to convert
+ * @param format
+ * the image format to use to serialise it (default is PNG)
+ *
+ * @return the Base64 representation
+ *
+ * @throws IOException
+ * in case of IO error
+ */
+ static public String fromImage(BufferedImage image, String format)
+ throws IOException {
+ if (format == null) {
+ format = "png";
+ }
+