Having imagery data to render as WMS I want to use the <ContrastEnhancement> of the <RasterSymbolizer> to enhance the image's contrast. To make my nodata-values transparent for the WMS output, my input raster has either defined a 4th alpha band or I define "InputTransparentColor" to 000000 in the layer properties of a 3-band rgb-raster accordingly (gdal dstnodata = 0). It works very well with the default raster style. But consider a custom style with contrast enhancement like this:
Using this style the transparent areas are being ignored and rendered black (r,g,b=0,0,0), even tough the corresponding alpha channel states 0 at the clicked coordinate. As I understand, the <ChannelSelection> of this SLD will strip out the alpha channel which GeoServer uses to render transparency. If the default raster style can handle alpha without problems it would be nice to combine it with <ChannelSelection> and <ContrastEnhancement> somehow. Can this be achieved on SLD level or within GeoServer?
Ubuntu 14.04 Server x64, Oracle Java 1.7, Native JAI