Ticket #1854 (closed defect: fixed)

Opened 1 year ago

Last modified 4 months ago

NITF and 1-bit images

Reported by: rouault Assigned to: warmerdam
Priority: normal Milestone: 1.5.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: nitf 1-bit
Cc:

Description

I've run GDAL on a number of NITF 2.1 images from http://www.gwg.nga.mil/ntb/baseline/software/testfile/Nitfv2_1/scen_2_1.html.

The following 1-bit images make GDAL segfault or give errors with valgrind :

  • i_3034c.ntf
  • ns3034d.nsf
  • i_3034f.ntf

I'm enclosing a patch that fixes the case of i_3034c.ntf. I'm not sure if this is right way to fix it but openev will display a green arrow on a red background as expected. The 2 other cases are not addressed by the patch.

Attachments

gdal_svn_trunk_fix_for_i_3034c_ntf_bug1854.patch (1.7 kB) - added by rouault on 09/22/07 12:32:17.
i_3034c.ntf (0.9 kB) - added by rouault on 09/22/07 12:33:15.
ns3034d.nsf (0.9 kB) - added by rouault on 09/22/07 12:33:33.
i_3034f.ntf (0.9 kB) - added by rouault on 09/22/07 12:33:47.

Change History

09/22/07 12:32:17 changed by rouault

  • attachment gdal_svn_trunk_fix_for_i_3034c_ntf_bug1854.patch added.

09/22/07 12:33:15 changed by rouault

  • attachment i_3034c.ntf added.

09/22/07 12:33:33 changed by rouault

  • attachment ns3034d.nsf added.

09/22/07 12:33:47 changed by rouault

  • attachment i_3034f.ntf added.

11/21/07 17:06:27 changed by warmerdam

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone set to 1.5.0.

Patch applied in trunk as r12927 with a few adjustments (added NBITS metadata, slightly improved error reporting).

Added test with i_3034c.ntf in the test suite (r12926).

05/10/08 11:08:19 changed by rouault

Additionnal fix for handling 1-bit uncompressed NITF images with NITF_IC=NM (for ns3034d.nsf and i_3034f.ntf) commited in trunk in r14423 and test for the 2 images added in the test suite in r14424