Bug report #16044

Raster: multiply causes NULLs to be painted in black

Added by Paolo Cavallini almost 3 years ago. Updated almost 3 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Symbology
Affected QGIS version:master Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23959

Description

On current master, if I load a coloured TIFF, it is displayed correctly.
If I change the blending mode to Multiply, the NULLs (0s) are displayed black, and they remain black even if I switch back to Blending=Normal.
On 2.18, the same TIFF is displayed as expected.
See attached file.

temp_col.tif (258 KB) Paolo Cavallini, 2017-01-06 01:15 AM

Associated revisions

Revision 632f9c58
Added by Mathieu Pellerin - nIRV almost 3 years ago

Fix for alphaBand and opacity loss upon renderer switch (style dock & properties window) (#3967)

  • [styledock] maintain raster alpha band and opacity when switching renderer
  • [raster] fix alphaBand/opacity loss when opening layer properties
    (fixes #16044)

History

#1 Updated by Giovanni Manghi almost 3 years ago

  • Priority changed from Normal to Severe/Regression
  • Target version set to Version 3.0

Please choose the appropriate priority/target version/etc when filing tickets.

#2 Updated by Mathieu Pellerin - nIRV almost 3 years ago

I can't reproduce on my system. Can you provide detailed steps to reproduce what your seeing?

#3 Updated by Paolo Cavallini almost 3 years ago

  • load sample raster --> shown correctly
  • Layer properties > Style > Blending mode > Multiply --> black areas appear
  • Layer properties > Style > Blending mode > Normal --> black areas remain
  • loading the same raster again --> shown correctly

Thanks for checking.

#4 Updated by Paolo Cavallini almost 3 years ago

Tested again, with freshly compiled master.

#5 Updated by Mathieu Pellerin - nIRV almost 3 years ago

Paolo, your going through the layer properties, not the style dock. Is that correct?

I suspect the problem has to do with the renderer losing track of the alphaBand value. When you see the black areas, try opening the style dock, go to the transparency tab and check whether the transparency band combo box is set to none (on your tif that'd be wrong) or "band 4 (alpha)".

#6 Updated by Giovanni Manghi almost 3 years ago

  • Status changed from Open to Feedback

#7 Updated by Paolo Cavallini almost 3 years ago

Layer properties, correct.
The transparency is set to Band4, switches to None when setting blending to multiplying. Setting it back to Band4 shows the raster as expected.
Thanks.

#8 Updated by Mathieu Pellerin - nIRV almost 3 years ago

  • Status changed from Feedback to Closed

#9 Updated by Mathieu Pellerin - nIRV almost 3 years ago

Paolo, np. It'd be useful if you can confirm the issue is gone on your machine.

#10 Updated by Paolo Cavallini almost 3 years ago

Confirmed, thanks a lot.

Also available in: Atom PDF