Opened 17 years ago

Closed 17 years ago

#1957 closed defect (fixed)

gdal_merge.py and gdalwarp fail to write 1 bit data

Reported by: schmitzu Owned by: warmerdam
Priority: normal Milestone: 1.5.0
Component: GDAL_Raster Version: 1.4.2
Severity: normal Keywords: gtiff nbits
Cc:

Description

Writing 1 bit depth raster data with gdal_merge.py or gdalwarp leads to corrupted output files. Though gdal_translate doesn't have this problem.

Doing for instance:

gdal_merge.py -co NBITS=1 -o dst.tif src.tif

leads to a jagged looking dst.tif (files are attached).

Attachments (2)

src.tif (32.1 KB ) - added by schmitzu 17 years ago.
dst.tif (32.6 KB ) - added by schmitzu 17 years ago.

Download all attachments as: .zip

Change History (4)

by schmitzu, 17 years ago

Attachment: src.tif added

by schmitzu, 17 years ago

Attachment: dst.tif added

comment:1 by warmerdam, 17 years ago

Component: defaultGDAL_Raster
Keywords: gtiff nbits added
Milestone: 1.5.0
Status: newassigned

I have confirmed this problem also occurs in trunk.

I'll address it myself.

comment:2 by warmerdam, 17 years ago

Resolution: fixed
Status: assignedclosed

I have not been able to reproduce this problem with 1.4 branch. It completely lacks support for creating files with NBITS parameter, so I'm surprised at that aspect of the report.

The problem (which related to scanlines not a multiple of 8bits) has been reproduced and fixed in trunk (r12590) and I have added a regression test for this issue (r12589).

Note: See TracTickets for help on using tickets.