Opened 14 years ago

Closed 13 years ago

#3790 closed defect (fixed)

BSB file cannot be color-expanded into RGB: "No entry 14"

Reported by: vadp Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: 1.7.2
Severity: normal Keywords: bsb vrt rgb
Cc:

Description

It looks similar to http://trac.osgeo.org/gdal/ticket/3777, but appears to be different as a workaround explained there doesn't work in this case.

Here is how to reproduce this:

$ gdal_translate -of vrt G1084_16.KAP G1084_16.KAP.vrt
$ gdalwarp -of gtiff G1084_16.KAP.vrt G1084_16.vrt.tif

The result is fine.

Then:

$ gdal_translate -of vrt -expand rgb G1084_16.KAP G1084_16.vrt -srcwin 1 1 1799 1799
$ gdalwarp -of gtiff G1084_16.vrt G1084_16.rgb.tif
Creating output file that is 1810P x 1795L.
Processing input file G1084_16.vrt.
ERROR 1: No entry 14.

The result is a fully transparent raster.

The link to the KAP file: http://depositfiles.com/files/jj77xkb86

Change History (3)

comment:1 by Even Rouault, 14 years ago

Yes, this is another issue than #3777. The problem here is that the file contains an index value (14+1=15 in the file) that is out of the color table... So I'd consider the file to be more or less broken w.r.t. its color table.

In trunk (due to r19692), the conversion to RGB still continues (the "ERROR 1: No entry 14" is just a warning now) and the result seems to look correct, although this is a bit by chance(since the non existing entry 14 is expanded to (14,14,14) which is almost black and happens to be OK for that image).

comment:2 by vadp, 14 years ago

Thanks for letting know. Meanwhile I'll just convert such a raster externally.

comment:3 by Even Rouault, 13 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.