Opened 17 years ago

Closed 17 years ago

#1789 closed defect (fixed)

INGR driver fails on bigendian systems

Reported by: warmerdam Owned by: ilucena
Priority: normal Milestone: 1.5.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: ingr
Cc: warmerdam

Description

The INGR driver fails the ingr.py tests quite thoroughly on my MacOS X system. I believe this is a big endian issue. Gdalinfo on gdalautotest/gdrivers/8bit_rgb.cot reports "not recognised as a supported file format".

Ivan, please let me know if you have the means to try and fix this bug (ie. access to a bigendian dev system). If not perhaps Mateusz or I will need to handle this.

Attachments (1)

gdal_svn_trunk_ingr_1789_and_other_fixes.patch (24.4 KB ) - added by Even Rouault 17 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Even Rouault, 17 years ago

The enclosed patch fixes various endianness issues. Now, gdal_info and gdal_translate work fine on 8bit_rgb.cot, 8bit_pal.cot, uint32.col on a big endian host.

I've tested it on a MIPS Debian Etch running on qemu. See http://www.aurel32.net/info/debian_mips_qemu.php which is a very good tutorial to install a MIPS Debian Etch under qemu. I could also provide my QCOW2 image but it's 1.2 GB large.

In the process of testing the endianness issues, I also fixed :

  • various memory leaks or incorrect memory usage (SetColorPalette was not cloning the input palette)
  • INGR_SetTransMatrix : it wasn't consistent with INGR_GetTransMatrix. You can see it with a gdal_translate -of INGR in.cot out.cot; gdal_info in.cot; gdal_info out.cot
  • INGR_SetIGDSColors and INGR_SetEnvironColors

comment:2 by Even Rouault, 17 years ago

PS : once gzipped, the qcow2 image is 360 MB large.

comment:3 by Even Rouault, 17 years ago

Commited in trunk in r12101

comment:4 by Even Rouault, 17 years ago

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