Opened 8 years ago

Closed 7 years ago

#5439 closed defect (fixed)

MBTiles driver not respecting transparency

Reported by: jpalmer Owned by: warmerdam
Priority: normal Milestone: 1.11.1
Component: GDAL_Raster Version:
Severity: normal Keywords: mbtiles
Cc:

Description

This attached mbtile file has png tiles with transparency. However when read using the GDAL driver and translated with gdal_translate transparency is not maintained. i.e

gdal_translate -of png -outsize 1000 1000 parcels_transparent.mbtiles parcels_transparent.png

I first noticed this when loading a MBTile file in QGIS.

Attachments (2)

parcels_transparent.png (6.9 KB) - added by jpalmer 8 years ago.
out_erouault.png (32.8 KB) - added by Even Rouault 8 years ago.

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by jpalmer

Attachment: parcels_transparent.png added

comment:2 Changed 8 years ago by Even Rouault

Seems to work fine on my side. Well at least I get a result almost fully transparent with a few polygons in yellow. See attached file.

Changed 8 years ago by Even Rouault

Attachment: out_erouault.png added

comment:3 Changed 8 years ago by Even Rouault

Hum, I tried again at home and reproduced your issue... So it seems that my dataset from this morning was something completely different !

Anyway, here it is :

trunk r27213, branches/1.11 r27214 : "MBTILES: better detection of 4 bands dataset (if sample tile is a paletted PNG with transparency); and take into account alpha component of color table in RasterIO() (#5439)"

comment:4 Changed 8 years ago by Even Rouault

trunk r27215, branches/1.11 r27216 : "MBTILES: avoid wrong detection of 3 bands when finding paletted PNG in /vsicurl mode (#5439)"

comment:5 Changed 8 years ago by jpalmer

Wow that's fantastic. Now works for me - Looks so much better in QGIS :)

Thanks Even

comment:6 Changed 7 years ago by Even Rouault

Component: defaultGDAL_Raster
Keywords: mbtiles added
Milestone: 1.11.01.11.1
Resolution: fixed
Status: newclosed
Version: svn-trunk
Note: See TracTickets for help on using tickets.