Opened 10 years ago

Closed 10 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 10 years ago.
out_erouault.png (32.8 KB ) - added by Even Rouault 10 years ago.

Download all attachments as: .zip

Change History (8)

by jpalmer, 10 years ago

Attachment: parcels_transparent.png added

comment:2 by Even Rouault, 10 years ago

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.

by Even Rouault, 10 years ago

Attachment: out_erouault.png added

comment:3 by Even Rouault, 10 years ago

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 by Even Rouault, 10 years ago

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

comment:5 by jpalmer, 10 years ago

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

Thanks Even

comment:6 by Even Rouault, 10 years ago

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.