Jump to content
We've recently updated our Privacy Statement, available here ×

limbeek

Members
  • Posts

    3
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by limbeek

  1. Hi, Can anyone tell me how to show an image in tiff format in Ireports. When I try this i'm getting the message "error displaying the page. See console for details" . Do I have to use the Java Advanced Image Library? I'd appreciate any help given Gerard Limbeek
  2. 2001 JI Open Discussion Wrote: The following is the explanation of how you can do it Use the SUN Java Advanced Imaging Library, you can get it from : http://java.sun.com/products/java-media/jai/downloads/download.html and this must help you convert the TIF image to an awt Image and which can be passed into Jasper Reports : ByteArraySeekableStream stream = new ByteArraySeekableStream(binaryData); ParameterBlock params = new ParameterBlock(); params.add(stream); // Specify to TIFF decoder to decode images as they are and // not to convert unsigned short images to byte images. TIFFDecodeParam decodeParam = new TIFFDecodeParam(); decodeParam.setDecodePaletteAsShorts(true); // Store the decode parameters in a RenderingHints to be sent // to the operation registry, and eventually to the TIFF decoder. RenderingHints hints = new RenderingHints(JAI.KEY_TILE_DECODING_PARAM,decodeParam); // Create an operator to decode the TIFF file. RenderedOp image1 = JAI.create("tiff", params, hints); // Find out the first image's data type. int dataType = image1.getSampleModel().getDataType(); RenderedOp image2 = null; if (dataType == DataBuffer.TYPE_BYTE) { // Display the byte image as it is. log.debug("TIFF image is type byte."); image2 = image1; } else if (dataType == DataBuffer.TYPE_USHORT) { // Convert the unsigned short image to byte image. log.debug("TIFF image is type ushort."); // Setup a standard window-level lookup table. */ byte[] tableData = new byte[0x10000]; for (int i = 0; i < 0x10000; i++) { tableData = (byte)(i >> 8); } // Create a LookupTableJAI object to be used with the // "lookup" operator. LookupTableJAI table = new LookupTableJAI(tableData); // Create an operator to lookup image1. image2 = JAI.create("lookup", image1, table); } else { log.debug("TIFF image is type " + dataType +", and will not be displayed."); } // Attach image2 to a scrolling panel to be displayed. BufferedImage bi = new BufferedImage(image2.getColorModel(),image2.copyData(), false, new Hashtable()); Hi, What steps need to be followed to get it work. I'm so far that I have downloaded the SUN Java Advanced Imaging Library. Can you please help give me some clarity? Thanks, Gerard
  3. I wonder if it is possible to run more then 1 report at the same time. I want to run reports simultaneously on the JasperReports server. Can the JasperReport server handle this? I would be grateful for any help. Kind regards, Gerard Post Edited by gerardlimbeek at 03/10/2011 14:08
×
×
  • Create New...