Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6988 closed defect (fixed)

GDAL: Read Raster Resample Problem

Reported by: dengo Owned by: warmerdam
Priority: normal Milestone: 2.1.5
Component: GDAL_Raster Version: 2.2.0
Severity: normal Keywords: Resample
Cc:

Description

I've noticed a strange problem when trying to read (while resampling) a specific tif.

The following call

GDALDatasetRasterIO(ds, Read, 0, 0, 1063, 2057, buffer, 133, 258, Byte, 3, {1, 2, 3}, 3, 399, 1)

produces garbled pixels in the buffer. The first row seems to be OK, the rest is mostly 0 with some random noise.

1063x2057 is the full size of the raster which is jpg compressed with a block size of 1063x8

I've attached the raster to this issue.

Attachments (1)

ResampleProblem.tif (374.0 KB ) - added by dengo 7 years ago.

Download all attachments as: .zip

Change History (6)

by dengo, 7 years ago

Attachment: ResampleProblem.tif added

comment:1 by Even Rouault, 7 years ago

Resolution: fixed
Status: newclosed

In 39743:

GTiff: fix reading subsampled JPEG-in-TIFF when block height = 8 (fixes #6988)

comment:2 by Even Rouault, 7 years ago

In 39744:

GTiff: fix reading subsampled JPEG-in-TIFF when block height = 8 (fixes #6988)

comment:3 by Even Rouault, 7 years ago

In 39745:

GTiff: fix reading subsampled JPEG-in-TIFF when block height = 8 (fixes #6988)

comment:4 by Even Rouault, 7 years ago

Milestone: 2.1.5

You can also workaround the issue by setting the configuration option / environment variable GTIFF_IMPLICIT_JPEG_OVR to NO

comment:5 by dengo, 7 years ago

Thanks for the fix and the workaround. Great work as always!

Note: See TracTickets for help on using tickets.