tgs
September 22, 2011, 8:27am
1
Hi,
I get the warning
“The function read(java.net.URL) is not applicable for the arguments (java.io.ByteArrayInputStream)”
about this function:
var image = new Packages.java.io.ByteArrayInputStream(pathToTheImage);
var image_awt = Packages.javax.imageio.ImageIO.read(image);
How can I fix that?
patrick
September 22, 2011, 8:46am
2
Without looking at this: why not use the images plugin?
tgs
September 22, 2011, 9:07am
3
Hi Patrick,
because I get an ERROR-exception from plugin:
< java.lang.Exception: Error evaluating expression : Source text : $P{logo_fa} >
I have replaced the Packages-function by
var img = plugins.images.getImage(pathToImage)
but perhaps I need something else to put the image by parameter on a jasperreport?
patrick
September 22, 2011, 9:11am
4
Ah. I oversaw Jasper.
Just add a type:
/** @type {java.io.InputStream} */
var image = new Packages.java.io.ByteArrayInputStream(pathToTheImage);
var image_awt = Packages.javax.imageio.ImageIO.read(image);