Skip to main content

Hi,


is it possible to return transparent pixels in a script?


setOutputComponentCount(4) and return [0, 0, 0, 0] does not seem to work - or I missed something in the configuration.


Thank you,

Jan

You probably need to set the transparency in the client-side application.


Hm, you suggest manipulated the pixels in an ol render function? - probably that is a way. Though, would be much easier if I could add transparent pixels in the WMS layer’s script.


Transparency per se is not supported but the proposed approach “hijacks” alpha channel of the png and should work, even directly in WMS. You have to use png format though.
https://www.sentinel-hub.com/faq/how-can-i-make-some-pixels-transparent


Thx! That does work. TRANSPARENT: ‘false’ did it.


Did you just create the FAQ or have I overlooked it ( sry if so)?


Faq was there already.


Reply