Opened 11 years ago
Closed 11 years ago
#4958 closed defect (fixed)
creating Nitf from Nitf with BLOCKA + other tags results in corrupt output
Reported by: | jeepingben | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.3 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | nitf blocka tre |
Cc: |
Description
Nitf images with a BLOCKA tag result in corrupt files if there are other tags specified in the TRE= creation options.
I found this while doing a createCopy to convert Nitf to Nitf wrapped JPEG2000.
The problem is in Nitffile.c and unclear definition of the nOffsetTREInHeader parameter to NITFWriteTRE(). The callers are passing the offset to the end of the last TRE, but NITFWriteTRE() is treating it like the offset to the first TRE. It is not clear which is correct, but it seems like the offset to the first TRE could be computed easily from nOffsetUDIDL and wouldn't need to be passed in.
The fix for this is easy once we know what nOffsetTREinHeader is supposed to contain.
Attachments (1)
Change History (2)
by , 11 years ago
Attachment: | UNKNOWN_IMG01001AA00000_0100001AA0100001.r0.r5 added |
---|
comment:1 by , 11 years ago
Component: | default → GDAL_Raster |
---|---|
Keywords: | nitf blocka tre added |
Milestone: | → 1.9.3 |
Resolution: | → fixed |
Status: | new → closed |
image that shows the problem