Opened 3 months ago

Closed 3 months ago

Last modified 3 months 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 3 months ago.

Download all attachments as: .zip

Change History (6)

Changed 3 months ago by dengo

Attachment: ResampleProblem.tif added

comment:1 Changed 3 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 39743:

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

comment:2 Changed 3 months ago by Even Rouault

In 39744:

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

comment:3 Changed 3 months ago by Even Rouault

In 39745:

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

comment:4 Changed 3 months ago by Even Rouault

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 Changed 3 months ago by dengo

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

Note: See TracTickets for help on using tickets.