Tip: embedding images in reports in Products Posted April 3, 2015 This doesn't work in JR 6.0.3, even though it did in 5.6.1.I tested additionally with this code:************************************************** public static void main(String[] args) { System.out.println("Starting img test"); String b64img = "her goes image encoded in base64"; try ( java.io.InputStream is = new java.io.ByteArrayInputStream(new sun.misc.BASE64Decoder().decodeBuffer(b64img)); ) { java.awt.image.BufferedImage bi = javax.imageio.ImageIO.read(is); System.out.println("Read image: "+bi); } catch (Throwable t) { System.err.println("Error: "+t); } }**************************************************And it works fine.I have Java 8 x86_64 running on Windows 7 x86_64.
Tip: embedding images in reports
in Products
Posted
This doesn't work in JR 6.0.3, even though it did in 5.6.1.
I tested additionally with this code:
**************************************************
public static void main(String[] args) {
System.out.println("Starting img test");
String b64img = "her goes image encoded in base64";
try (
java.io.InputStream is = new java.io.ByteArrayInputStream(new sun.misc.BASE64Decoder().decodeBuffer(b64img));
) {
java.awt.image.BufferedImage bi = javax.imageio.ImageIO.read(is);
System.out.println("Read image: "+bi);
} catch (Throwable t) {
System.err.println("Error: "+t);
}
}
**************************************************
And it works fine.
I have Java 8 x86_64 running on Windows 7 x86_64.