Opened 16 years ago
Closed 14 years ago
#2640 closed defect (fixed)
[PATCH] Use GDAL transparency masks
Reported by: | rouault | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | GDAL Support | Version: | unspecified |
Severity: | normal | Keywords: | gdal transparency mask |
Cc: | sdlime, hobu |
Description
From GDAL >= 1.5.0, the concept of transparency mask has been introduced. See RFC 15.
This patch uses dataset transparency masks when no alpha band is available. It reads the mask band and simulates as if it was an alpha band, so the impact on existing code is minimum.
Attachments (5)
Change History (12)
by , 16 years ago
Attachment: | transparency_mask.map added |
---|
by , 16 years ago
Attachment: | test_with_mask_1bit.tif added |
---|
Grey level image with transparency mask
comment:1 by , 16 years ago
Note : the above attached TIFF images have internal transparency masks, that are only handled on GDAL trunk >= r14647.
by , 16 years ago
Attachment: | result.tif added |
---|
Expected result : grey square at the centre of a red background
comment:2 by , 16 years ago
Component: | MapServer C Library → GDAL Support |
---|---|
Owner: | changed from | to
Changing component to "GDAL Support"... I can apply but would like Frank's blessing.
Steve
comment:3 by , 16 years ago
Cc: | added; removed |
---|
comment:4 by , 16 years ago
I've discovered the existence of msautotest/gdal, and of course by testing it, I discovered that my patch introduced a regression in unclassified.map, where the PROCESSING "BANDS=1,2,3" directive excludes the alpha component of the RGBA image from being taken into account. So I'm updating the patch not to try to use transparency masks when the BANDS keyword is used in PROCESSING. This way the test suite passes fine again.
Patch updated.
by , 16 years ago
Attachment: | mapdrawgdal_transparency_mask.patch added |
---|
Patch to use GDAL transparency masks (updated not to be triggered with BANDS keyword)
comment:5 by , 15 years ago
Cc: | added |
---|
comment:6 by , 14 years ago
Milestone: | → 6.0 release |
---|---|
Status: | new → assigned |
I have incorporated a slight variation on the patch in trunk (r10002).
comment:7 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
To test with "./shp2img -m transparency_mask.map -o result.tif -l TEST -s 200 200 -e 0 0 19 19"