Ticket #2917 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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

Changed 3 years ago by ilucena

  • status changed from new to closed
  • resolution set to fixed

Fixed on revision r16689

Note: See TracTickets for help on using tickets.