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

Handle raster layer's transparency band while rendering (fix #2491) #52

Merged
merged 1 commit into from
Oct 20, 2011

Conversation

brushtyler
Copy link
Contributor

This patch allow to set a transparency band for raster layers from Layer -> Property ->Transparency. The combobox to select the transparency band was present yet, but it was disabled because not implemented yet.

Of course I tried it and it works well, but further tests are welcome for this kind of rendering related stuff.
I also think this commit should be backported, that grayed combobox is very annoying for users.

@timlinux
Copy link
Member

Excellent stuff! Will test it shortly.

Regards

Tim

@brushtyler
Copy link
Contributor Author

Furthermore, IMHO all those draw private methods (i.e. 7 methods) should be merged in 2 or max 3 methods, the first one for one-band rasters (singleband and paletted) and the second for multi-band rasters because in this moment almost all their code is duplicated.
I don't know if there's a reason to keep them separated, but if there's no reason I'm happy to work on it.

Next step will be make GDAL provider able to get the mask band and set it as the raster layer's transparency band (see #4159).

@timlinux
Copy link
Member

Hi

Yes that list of separate methods was written by me a loooong time ago and hasnt really undergone any revision since. If you have a better way go for it. It would be nice to fix the misreporting of pixel depth and inability to render certain images that was introduced with raster reprojection - or at least not let it regress any further.

Regards

Tim

@timlinux
Copy link
Member

Hi

I tested it and it seems to work fine for me. I would like to do further testing and having a unit test added to the test suite would be nice, but I will merge this in the mean time and we can consider a backport of it to the release branch.

Regards

Tim

timlinux added a commit that referenced this pull request Oct 20, 2011
[BACKPORT] Handle raster layer's transparency band while rendering (fix #2491)
@timlinux timlinux merged commit b0112f1 into qgis:master Oct 20, 2011
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

Successfully merging this pull request may close these issues.

2 participants