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

transpValue not working properly for rgb geotiff? #32

Open
teoxonline opened this issue Nov 12, 2021 · 0 comments
Open

transpValue not working properly for rgb geotiff? #32

teoxonline opened this issue Nov 12, 2021 · 0 comments

Comments

@teoxonline
Copy link

Hi, your code is not working as expected
for RGB geotiff with 3 active bands when you set transpValue you should check for all the three r,g,b values matches the trasnpValue, not only for the alphaBand specified, your case is useful for single layer geotiff but for three bands rgb, to avoid holes in the final composite rapresentation, the transpValue:0 should match the rgb(0,0,0)

  const a = this.options.transpValue ? data[this.options.alphaBand].map(v => {
    return v == this.options.transpValue ? 0 : 255;
  }) : data[this.options.alphaBand];
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

1 participant