Opened 15 years ago

Closed 15 years ago

#2917 closed defect (fixed)

GeoRaster: NBIT need swapping

Reported by: ilucena Owned by: ilucena
Priority: high Milestone: 1.6.1
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: GEORASTER
Cc: warmerdam

Description

GeoRaster uses 1, 2 and 4 bits data type but to read it is not just a matter of unpacking, the driver need to swap it to a reverse order, from left to right. Example:

input:

8 BIT : '01100101'

output:

1 BIT : 1, 0, 1, 0, 0, 1, 1, 0
2 BIT : 01, 01, 10, 01
4 BIT : 0101, 0110

The same logic should by applied for writing GeoRaster; And the Color Table shouldn't be bigger than 2, 4 and 16 items for 1, 2 and 4 bits respectively.

I have the solution for that problem and it seams to be working fine, so I will commit it after more tests.

Change History (1)

comment:1 by ilucena, 15 years ago

Resolution: fixed
Status: newclosed

Fixed on revision r16689

Note: See TracTickets for help on using tickets.