Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2369

Call "javax.imageio.ImageReader.canReadRaster()" before attempt to read raster

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.1
    • None
    • image/unqualified
    • None

    Description

      The method:

      org.apache.xmlgraphics.image.loader.impl.imageio.ImageLoaderImageIO.getFallbackBufferedImage(ImageReader, int, ImageReadParam)

      calls:

      reader.readRaster(pageIndex, param);

      but it should first call "javax.imageio.ImageReader.canReadRaster()" to see if the reader can render the raster.
      Otherwise if the image reader cannot render rasters such exceptions may occur:

            [fop] Caused by: java.lang.UnsupportedOperationException
            [fop] 	at com.oxygenxml.media.imageioimpl.plugins.tiff.TIFFImageReader.readRaster(Unknown Source)
            [fop] 	at org.apache.xmlgraphics.image.loader.impl.imageio.ImageLoaderImageIO.getFallbackBufferedImage(ImageLoaderImageIO.java:356)
            [fop] 	at org.apache.xmlgraphics.image.loader.impl.imageio.ImageLoaderImageIO.loadImage(ImageLoaderImageIO.java:157)
            [fop] 	at org.apache.xmlgraphics.image.loader.pipeline.ImageProviderPipeline.execute(ImageProviderPipeline.java:154)
            [fop] 	at org.apache.xmlgraphics.image.loader.pipeline.ImageProviderPipeline.execute(ImageProviderPipeline.java:99)

      Attachments

        Activity

          People

            Unassigned Unassigned
            radu_coravu Radu Coravu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified