Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2759 closed defect (fixed)

gdalwarp to geotiff 1 bit mangles image

Reported by: kyngchaos Owned by: Even Rouault
Priority: normal Milestone: 1.6.1
Component: GDAL_Raster Version: 1.6.0
Severity: normal Keywords: gtiff
Cc:

Description

When warping a 1 bit image (geotiff) to a 1 bit geotiff, using:

-co "NBITS=1"

on a large image, I get bands of projected image interlaced with bands of black. It also miscalculates the

I tested up to 8000x8000 size before I could get it to occur, smaller images were OK. Works fine in GDAL 1.5.3. If I let it warp to the default 8bit image it's OK.

It doesn't even matter if I actually "project" the image or use the same SRS as the source image.

Attachments (3)

warp-good.tif (67.8 KB ) - added by kyngchaos 15 years ago.
A good warp - sample resized, source is proprietary material
warp-nogood.tif (40.6 KB ) - added by kyngchaos 15 years ago.
warp-detail.tif (18.2 KB ) - added by kyngchaos 15 years ago.
detail of part just below first good band - note the replication of pixels trailing off

Download all attachments as: .zip

Change History (7)

by kyngchaos, 15 years ago

Attachment: warp-good.tif added

A good warp - sample resized, source is proprietary material

by kyngchaos, 15 years ago

Attachment: warp-nogood.tif added

by kyngchaos, 15 years ago

Attachment: warp-detail.tif added

detail of part just below first good band - note the replication of pixels trailing off

comment:1 by warmerdam, 15 years ago

Component: UtilitiesGDAL_Raster
Keywords: gtiff added

comment:2 by Even Rouault, 15 years ago

Owner: changed from warmerdam to Even Rouault

Yes, confirmed. Regression introduced in r14840 while fixing #2360...

Fix is to memset the buffer in GTiffDataset::LoadBlockBuf() in the "if( !bReadFromDisk )" test

comment:3 by Even Rouault, 15 years ago

Resolution: fixed
Status: newclosed

Hum, there was also an issue in the multi-band interleaved case...

Fixed in trunk in r16010 and in branches/1.6 in r16012. Test added in r16011

comment:4 by kyngchaos, 15 years ago

That works. Thanks.

Note: See TracTickets for help on using tickets.