I've written a plugin which essentially imports a number of colour geoTifs (map tiles) which works correctly but it would be great to display these as Grayscale after loading in.
The geoTifs load as paletted images (under Render Type) and I am looking to have them display as they do when you manually change the layer properties to set Grayscale to any of the three options (by lightness, by luminosity, by averaqe).
I've tried many things which haven't worked including things like layer.setDrawingStyle('PalettedSingleBandGray') which gives a very strange looking image - I assume it's only using information from a single colour channel?
I appreciate that these Grayscale options are relatively new to QGIS and hence their implementation through pyQGIS may not be straightforward, but I'm completely stuck with this now and would be very grateful for any help!
Thank you in advance.
أكثر...
The geoTifs load as paletted images (under Render Type) and I am looking to have them display as they do when you manually change the layer properties to set Grayscale to any of the three options (by lightness, by luminosity, by averaqe).
I've tried many things which haven't worked including things like layer.setDrawingStyle('PalettedSingleBandGray') which gives a very strange looking image - I assume it's only using information from a single colour channel?
I appreciate that these Grayscale options are relatively new to QGIS and hence their implementation through pyQGIS may not be straightforward, but I'm completely stuck with this now and would be very grateful for any help!
Thank you in advance.
أكثر...