Raster Transparency

Allows adjusting transparency of a singleband rasters interactively. For a selected raster, it is possible to define a range of pixel values that will be visible. Outside that range all remaining pixel will become transparent.

<–

Installation

The plugin is published in my repository. –>

Usage

Once installed and enabled, Raster Transparency adds a new tab called “Raster Transparency” to the QGIS “Layer Styling Panel”.

In the QGIS layer tree select a singleband raster or a multiband raster in a singleband mode rendering mode (e.g., “Singleband pseudocolor”). Then, open the “Layer Styling Panel” and switch to the “Raster Transparency” tab.

Raster Transparency plugin tab in the Layer Styling panel
Raster Transparency tab in the Layer Styling panel

Use the slider and/or spinboxes to control the transparent pixels range. The slider has two handles: the left handle is used to control transparency from the raster’s minimum value to the upper pixel values; the right handle is used to control transparency range from the raster’s maximum value to lower pixel values. The raster transparency will change interactively as you move the slider’s handles or edit the values in the spinboxes.

For example, let’s look at a singleband raster layer with pixel values in the range from 85 to 243. After setting the left handle to the position 95, all pixels with values from 85 to 95 will become transparent. If we, additionally, move the right handle to the 220 position, a new transparency range will be added to the raster’s style, and all pixels with the pixel values from 220 to 243 will become transparent as well.

Raster Transparency plugin in action
Raster Transparency plugin in action