Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to brighten/darken tiles based on a custom function? #8080

Closed
shobhitg opened this issue Mar 26, 2019 · 2 comments
Closed

Is there a way to brighten/darken tiles based on a custom function? #8080

shobhitg opened this issue Mar 26, 2019 · 2 comments

Comments

@shobhitg
Copy link

Hi,

I am trying to see if I can apply a custom brightness function on the raster tiles.

I see there are some paint knobs to control the brightness and contrast:
https://docs.mapbox.com/mapbox-gl-js/style-spec/#paint-raster-raster-brightness-min
and
https://docs.mapbox.com/mapbox-gl-js/style-spec/#paint-raster-raster-contrast

But what I really want is an ability to define a custom brightness function.

Here is what I am trying to do: Any pixel that is brighter than a certain threshold of gray should turn to white and the remaining pixels stay as is.
This is a bit more custom than the raster brightness or raster contrast knob.

Is this possible anyhow?

@andrewharvey
Copy link
Collaborator

#3889 would allow you to re-map a raster, hopefully supporting this use case.

@mourner
Copy link
Member

mourner commented Mar 29, 2019

Yep, closing as a duplicate of #3889.

@mourner mourner closed this as completed Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants