Bug report #288

QGIS renders raster tifs with transparent alpha channel as opaque.

Added by w5pny-w5pny-com - about 14 years ago. Updated over 11 years ago.

Status:Closed
Priority:Low
Assignee:Gavin Macaulay -
Category:Rasters
Affected QGIS version: Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:10347

Description

Using QGIS 0.7.4 under Ubuntu Dapper, one cannot load
two adjacent raster RGBA geotiffs with transparent collars and have
the collars rendered transparently with QGIS.

This can be reproduced by getting:

http://www.w5pny.com/download/Bland_t.tif

and

http://www.w5pny.com/download/Frijoles_t.tif

and loading them with QGIS.

History

#1 Updated by Redmine Admin almost 14 years ago

Is this still valid for 0.8? Please note: it may be related to https://svn.qgis.org/trac/ticket/441

#2 Updated by w5pny-w5pny-com - almost 14 years ago

I would like to be able to check for this problem in 0.8, but I am running
Ubuntu Dapper on an AMD64 and its latest Qt package is 4.1.2, so I can not
complete the build. When there is an AMD64 Ubuntu Dapper 0.8 package, or when
Qt 4.2 for Ubuntu Dapper AMD64 comes out I can give it a try.

#3 Updated by anonymous - almost 14 years ago

Replying to [comment:2 ]:

I would like to be able to check for this problem in 0.8, but I am running
Ubuntu Dapper on an AMD64 and its latest Qt package is 4.1.2, so I can not
complete the build. When there is an AMD64 Ubuntu Dapper 0.8 package, or when
Qt 4.2 for Ubuntu Dapper AMD64 comes out I can give it a try.

I finally built Qt 4.2.2 in /usr/local and used that to build Qgis 0.8.
The problem DOES still exist with 0.8. In my original post I provided a url
with geotiff raster files that have transparent collars to demonstrate the problem.

#4 Updated by anonymous - almost 14 years ago

Replying to [comment:3 anonymous]:

Replying to [comment:2 ]:

I would like to be able to check for this problem in 0.8, but I am running
Ubuntu Dapper on an AMD64 and its latest Qt package is 4.1.2, so I can not
complete the build. When there is an AMD64 Ubuntu Dapper 0.8 package, or when
Qt 4.2 for Ubuntu Dapper AMD64 comes out I can give it a try.

I finally built Qt 4.2.2 in /usr/local and used that to build Qgis 0.8.
The problem DOES still exist with 0.8. In my original post I provided a url
with geotiff raster files that have transparent collars to demonstrate the problem.

Further playing with the transparency slider with 0.8 under the layer properties seems to
confirm that Qgis is not paying any attention to alpha channel information
in geotifs. The geotif raster files refered to in the original url to demonstrate
the problem have the transparency information for the map collars in the alpha channel
of the geotiffs. Other tif renderers, like the GIMP seem to handle this correctly.

#5 Updated by w5pny-w5pny-com - almost 14 years ago

Replying to [comment:5 g_j_m]:

Each pixel in the geotifs in the above URLs has R, G, B, and ALPHA. The ALPHA is the
alpha channel and indicates the transparency of the pixel. This allows regions
within ONE geotif to have varying transparencies. Hence one can write software
that makes the collars of geotifs transparent and the map itself opague. If Qgis honors
the alpha channel, then adjacent maps are rendered seamlessly joined. If Qgis does
not honor the alpha channel, then one gets white wedges along the common edges
of adjacent maps, even though those maps have the alpha channel information in them.

Hopefully this will get fixed by 0.9....

#6 Updated by anonymous - almost 14 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed

Fixed in 0.8 release () and head (). A band can now be selected as the transparent one. Whenever the pixel value for that band is zero, that pixel will be transparent. A further enhancement has been requested in ticket #441, which this change doesn't address.

#7 Updated by Anonymous over 11 years ago

Milestone Version 0.9 deleted

Also available in: Atom PDF