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

Problems with raster transparency #15319

Closed
qgib opened this issue Jun 22, 2012 · 7 comments
Closed

Problems with raster transparency #15319

qgib opened this issue Jun 22, 2012 · 7 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Jun 22, 2012

Author Name: Benoit de Cabissole (Benoit de Cabissole)
Original Redmine Issue: 5850
Affected QGIS version: master
Redmine category:rasters
Assignee: Marco Hugentobler


A 1-band (GDT_Float32 - Thirty two bit floating point) GeoTIFF raster file is rendered as 'singleband gray'.

(1) In the 'Transparency' tab of raster properties there is a button called 'Default values'.
Click on that button. This results in the table header to be filled with "red, green, blue, Percent transparent" instead of "Gray, Percent transparent".
Close the properties window and open it again, the correct header is then displayed.

(2) Same raster, same wrong table header after clicking 'Default values'. Now type in a RBG colour code to set it transparent: 128, 128, 128, 100 (it is a grey shade after all).
After clicking on 'Apply' the green component changes to 0 (128, 0, 128, 100) and there is no effect on the displayed raster.

(3) The min/max values of the raster are: -0.5984/0.9996 respectively and the no-data-value is -9999.0
There is no way to make the no-data-value transparent and to display the raster in greyscale. The no-data-value is always displayed in black and the raster in uniform grey, whatever the 'Contrast enhancement' used (BTW, the 'Load min/-max values' is set to 'Actual (slower)' and the 'Load' button is clicked to load the correct min/max values).
Very similar to Bug #15317.

@qgib
Copy link
Contributor Author

qgib commented Jun 22, 2012

Author Name: Giovanni Manghi (@gioman)


On what QGIS version? Now that the resampling branch has been merged the tests and notes/tickets should be based on qgis-master. Cheers!

@qgib
Copy link
Contributor Author

qgib commented Jun 22, 2012

Author Name: Benoit de Cabissole (Benoit de Cabissole)


From OSGeo4W Quantum QGIS 1.9.0-master, QGIS code revision: 02b1324.

@qgib
Copy link
Contributor Author

qgib commented Jun 22, 2012

Author Name: Benoit de Cabissole (Benoit de Cabissole)


Just to add an oddity for point (3) above.

Preamble:
The no-data-value is generally -9999 in my rasters and they are all FLOAT32.
As said above, the no-data-value is not rendered as transparent, it is sometimes black, some other times another colour.

The oddity:
If I add the no-data-value to the 'Transparent pixel list' and click 'Apply', nothing happens.
But, if I then move a little bit the 'Global transparency' slider and click 'Apply', boom, the no-data-value is effectively transparent!
Then, I save the project and reload it. The no-data-value is again displayed in a solid colour (non-transparent) and the "slider trick" is again necessary to display the no-data-value as transparent...

@qgib
Copy link
Contributor Author

qgib commented Jun 24, 2012

Author Name: Giovanni Manghi (@gioman)


Benoit de Cabissole wrote:

From OSGeo4W Quantum QGIS 1.9.0-master, QGIS code revision: 02b1324.

this used to work ok in qgis 1.7.4 (and works fine in 1.8?)?

if yes then assign this ticket to Marco H., this can be a consequence of the merge of the "resampling" branch.


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jun 25, 2012

Author Name: Benoit de Cabissole (Benoit de Cabissole)


Yes, it works fine on 1.8 (only tested on one of the rasters I have problems with in 1.9).
Assigned to Marco H.


  • assigned_to_id was configured as Marco Hugentobler

@qgib
Copy link
Contributor Author

qgib commented Jun 29, 2012

Author Name: Marco Hugentobler (@mhugent)


Is this still the case with latest master?
If yes, please attach a sample dataset (or send it to me privately if secret)

@qgib
Copy link
Contributor Author

qgib commented Jul 4, 2012

Author Name: Marco Hugentobler (@mhugent)


Fixed in master branch. Please reopen the ticket if there are still issues.


  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats) labels May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant