+ /**
+ * Create an image from Base64 encoded data.
+ *
+ * <p>
+ * Please use {@link Image#Image(InputStream)} when possible instead, with a
+ * {@link Base64InputStream}; it can be much more efficient.
+ *
+ * @param base64EncodedData
+ * the Base64 encoded data as a String
+ *
+ * @throws IOException
+ * in case of I/O error or badly formated Base64
+ */
+ public Image(String base64EncodedData) throws IOException {
+ this(new Base64InputStream(new ByteArrayInputStream(
+ StringUtils.getBytes(base64EncodedData)), false));
+ }
+