[Geoserver-devel] [jira] (GEOS-5303) GetMap returns alpha channel from 4-band image with transparent=false

Felix LJ Mayer created BugGEOS-5303
GetMap returns alpha channel from 4-band image with transparent=false

Issue Type:

BugBug

Affects Versions:

2.1.1

Assignee:

Andrea Aime

Attachments:

4band0.tif

Components:

WMS

Created:

11/Sep/12 3:59 PM

Description:

Steps:

  1. Create a GeoTIFF store and layer with the attached 4-band image.
  2. View the layer in the Layer Preview.
  3. In the layer preview URL, replace ‘format=application/openlayers’ with ‘format=image/png’. You can also add ‘&TRANSPARENT=false’ to be sure.
  4. Refresh the URL and the returned image will look very pale.
  5. Save the image and run gdalinfo on it. It will report 4 bands.

Reading the OGC’s WMS 1.1.1 specification, I can only conclude that a GetMap request should not return an alpha channel unless TRANSPARENT=true has been specified. So one could argue that GeoServer violates the specificatin on in this case. Admittedly I have given a 4-band image to GeoServer, but I think the proper way to handle this is to never read more than 3 bands when doing a WMS request (or maybe throw an exception).

Admittedly an SLD can fix this issue, but unfortunately it can also create problems when multiple layers are mosaiced together.

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Felix LJ Mayer

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your [JIRA administrators](https://jira.codehaus.org/secure/ContactAdministrators!default.jspa). For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)