How do I make raster layers (Tiff) transparent? To simply right click and choose properties does not work, I do not get the option of making it transparent when doing that. In the raster menu, there is a raster transparency option, but when I open this the bars are not active and nothing can be done. Is using a Tiff file a problem in QGIS 2.12, or can anyone please tell me how to do this?
2 Answers
You have to right click on the Layer in the Layers Panel on the left and select Properties where you can then set the Global Transparency for this layer. This works the same no matter your raster or vector format.
-
What does work by the way, is to change the transparency properties in the georefencing window when working with a raster file there, then it will stay transparent when imported. But it would be nice to be able to change transparency once in the main GIS window as well.– KajsaCommented Nov 16, 2015 at 12:55
Not sure what the problem is, I can access Layer Properties > Transparency and change the Global transparency and the Custom transparency options as answered by @Kersten.
Alternatively, you can use the Python Console to set your transparency:
rlayer = qgis.utils.iface.activeLayer()
rlayer.renderer().setOpacity(0.5) # 0.5 = 50%; 0.1 = 90%...
rlayer.triggerRepaint()
There's also the Raster Transparency and the rasparenza plugins which you can download and install from the toolbar (Plugins > Manage and Install Plugins).
Hope this helps!
-
As said above, the right click option and going via the menu-raster- transparency does not works for me. That is why i need help. When I right click I do not get the options you show above at all, I only get a list of properties (the information you find under "general" in the top of your menu. That is, I do not get the menu, only the general information). I can access that menu via the layers menu, but I still can´t change anything that way. I have not tried thesuggested plugins, but will do that, thanks!– KajsaCommented Nov 16, 2015 at 12:25
-
And checking, i already have the raster transparency plugin, so no, it still does not work.– KajsaCommented Nov 16, 2015 at 12:30
-
@Kajsa - Could you perhaps share this raster file in a public server so that others could test it? I don't think I ever came across this issue. Have you tried doing it through the Python Console?– JosephCommented Nov 16, 2015 at 12:32
-
no i have not (I´m kind of scared of code) but will try that too ;-)– KajsaCommented Nov 16, 2015 at 12:40
-
@Kajsa - Haha don't worry, I avoided code for a while too :)– JosephCommented Nov 16, 2015 at 12:44