Bug report #16546
exporting a raster layer with multiply blend mode with a dpi settings > 96 fails
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | Mathieu Pellerin - nIRV | ||
Category: | Rasters | ||
Affected QGIS version: | master | Regression?: | Yes |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | Yes | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 24452 |
Description
Exporting a raster layer with a blend mode set to multiply fails to render properly for an output dpi that is greater than 96 dpi. The exported image results in a raster layer that blends only part of its full area (the part being equivalent to what the size would be in 96 dpi). It's a bit hard to explain, but the attached screenshot (300.jpg) should do a good job at showing the issue.
Steps to reproduce- Open the raster-blending-bug test project (get it here: http://www.licadho-cambodia.org/raster-blending-bug.zip)
- Save the canvas as an image, set the output dpi to 300
- Open the exported image, take note of the issue :)
Associated revisions
[raster] fix raster blending (fixes #16546)
History
#1 Updated by Mathieu Pellerin - nIRV over 7 years ago
- File 96dpi-ok.jpg added
- File 300dpi-bad.jpg added
Here's a pair of exported images that shows the problem a bit better. It's clear that the 300dpi export has part of the image below the raster layer chopped off.
#2 Updated by Mathieu Pellerin - nIRV over 7 years ago
- File 300dpi-semi.jpg added
Hmm, if I add some transparency to the multiply blend raster layer, it shows part of the underlying background.
So what seems to happen here is that the blend mode doesn't respect / account for the output dpi. That looks more and more like a Qt issue :/
#3 Updated by Mathieu Pellerin - nIRV over 7 years ago
- Resolution set to up/downstream
- Status changed from Open to Closed
The area that's properly blended is a fixed 2000 px x 2000px, I'm closing this now concluding it's an issue with regards to the underlying Qt library.
#4 Updated by Mathieu Pellerin - nIRV over 7 years ago
- Resolution deleted (
up/downstream) - Status changed from Closed to Reopened
Change of mind. 2000 x 2000 pixels happens to be this raster related with n height constant:
static const int DEFAULT_MAXIMUM_TILE_WIDTH = 2000;
static const int DEFAULT_MAXIMUM_TILE_HEIGHT = 2000;
That, and the fact that I can't see any problem with vector layers (eg a polygon covering the whole output area) points out at a problem in QGIS instead.
#5 Updated by Mathieu Pellerin - nIRV over 7 years ago
- Pull Request or Patch supplied changed from No to Yes
- Priority changed from Normal to High
- Regression? changed from No to Yes
- Assignee set to Mathieu Pellerin - nIRV
Issue located, patch coming to github in the coming hour.
#6 Updated by Mathieu Pellerin - nIRV over 7 years ago
- % Done changed from 0 to 100
- Status changed from Reopened to Closed
Applied in changeset qgis|93c59f4e25cdfea7e703845891a907d6c1363ea8.
#7 Updated by Giovanni Manghi over 7 years ago
- Resolution set to fixed/implemented