Skip to main content
Question

Convert raster band while retaining alpha channel?

  • January 19, 2026
  • 3 replies
  • 22 views

aron
Enthusiast
Forum|alt.badge.img+16

I have rasters with one alpha channel and one grey channel. I need to ensure that the grey band is grey8. How do I coerce only the grey band and leave the alpha band untouched?

The RasterInterpretationCoercer will change both bands and I have not found any other transformer that fits my requirements.  

3 replies

daveatsafe
Safer
Forum|alt.badge.img+21
  • Safer
  • January 19, 2026

Hi ​@aron,

Please use a RasterSelector to select the Grey band, then use a RasterBandInterpretationCoercer to adjust the selected band to Gray16. Finally, use another RasterSelector to Select all bands for any further processing.


aron
Enthusiast
Forum|alt.badge.img+16
  • Author
  • Enthusiast
  • January 20, 2026

I am not getting this to work. Might be a setting or something. Seems that the Alpha band does not get “reactivated”, only band 0 (grey16) comes out the other end.

My settings:

Incoming raster:

Processed raster:

 


daveatsafe
Safer
Forum|alt.badge.img+21
  • Safer
  • January 20, 2026

Please use the RasterBandInterpretationCoercer instead of the RasterinterpretationCoercer. This will adjust individual bands instead of the entire raster.