Uploaded image for project: 'GeoTools'
  1. GEOT-5318

GridCoverageRenderer fails on indexed image with null background color

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 14.2, 15.0
    • Component/s: render
    • Labels:
      None

      Description

      While fixing GEOS-7270 Closed I found that rendering an coverage with an indexed color model via GridCoverageRenderer.renderImage(reader,...) produced a null pointer exception:

      java.lang.NullPointerException: Argument "bgColor" should not be null.
      	at org.geotools.resources.image.ColorUtilities.findColorIndex(ColorUtilities.java:506)
      	at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:822)
      

      The problem comes from attempting to expand the color model on an indexed raster even when a background color hasn't been provided.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dtucker Devon Tucker
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: