Opened 13 years ago

Closed 12 years ago

#4340 closed defect (fixed)

JP2KAK: Reads from overview band returns data from the main band

Reported by: yehiyam Owned by: warmerdam
Priority: normal Milestone: 1.9.0
Component: default Version: 1.8.1
Severity: normal Keywords: jp2kak kakadu jpeg2000
Cc:

Description

System: windows7 64 bit with gdal source version 1.8.1 SDK version v6.0 (v6_0-00828N)

When opening a .jp2 file with the kakadu driver (jp2kak) and trying to read a region from an overview band, the data is read from the main band.

To reproduce: Use the CSharp sample app GDALReadDirect GDALReadDirect utm.jp2 overview0.png 0

this will create an image the size of the first overview, but with the contents from the upper right quarter of the main band.

Attachments (1)

jp2kakDataset.cpp.patch (13.1 KB ) - added by yehiyam 13 years ago.

Download all attachments as: .zip

Change History (4)

by yehiyam, 13 years ago

Attachment: jp2kakDataset.cpp.patch added

comment:1 by yehiyam, 13 years ago

I've created a patch that I think resolves this issue (at least for my test cases it works fine).

comment:2 by warmerdam, 12 years ago

Status: newassigned

I have been unable to reproduce the problem with dumpoverviews, but I see it does line by line io which skips the direct case. I'm not keen on another complete directio implementation for bands but I'm optimistic I can fix the problem at the dataset level.

comment:3 by warmerdam, 12 years ago

Milestone: 1.9.0
Resolution: fixed
Status: assignedclosed

Fixed in trunk (r23582) and 1.8 branch (r23583). The problem only occurs when reading overviews directly on overview bands via the "direct" api as oppposed to through the block cache.

Note: See TracTickets for help on using tickets.