Opened 18 years ago

Closed 17 years ago

Last modified 15 years ago

#288 closed bug (fixed)

QGIS renders raster tifs with transparent alpha channel as opaque.

Reported by: w5pny@… Owned by: g_j_m
Priority: major: does not work as expected Milestone:
Component: Rasters Version: 0.7
Keywords: alpha channel RGBA transparent Cc:
Must Fix for Release: No Platform: Debian
Platform Version: Awaiting user input: no

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.

Change History (8)

comment:1 by cavallini@…, 17 years ago

Milestone: Version 0.9 Release
Must Fix for Release: No

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

comment:2 by w5pny@…, 17 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.

in reply to:  2 ; comment:3 by anonymous, 17 years ago

Replying to w5pny@w5pny.com:

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.

in reply to:  3 comment:4 by anonymous, 17 years ago

Replying to anonymous:

Replying to w5pny@w5pny.com:

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.

comment:5 by g_j_m, 17 years ago

Owner: changed from timlinux to g_j_m

in reply to:  5 comment:6 by w5pny@…, 17 years ago

Replying to 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....

comment:7 by anonymous, 17 years ago

Resolution: fixed
Status: newclosed

Fixed in 0.8 release (r6393) and head (r6394). 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.

comment:8 by (none), 15 years ago

Milestone: Version 0.9

Milestone Version 0.9 deleted

Note: See TracTickets for help on using tickets.