Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openjpeg driver in gdal 2.4 fails to read overviews from jp2 files #1860

Closed
an-ivanov opened this issue Sep 18, 2019 · 1 comment
Closed
Milestone

Comments

@an-ivanov
Copy link
Contributor

Expected behavior and actual behavior.

GDALRasterIO calling Openjpeg driver functions fails to read data of a overview starting from a certain level.
This is for the file:
IMG_PHR1A_PMS-N_201905050814388_SEN_4485844101-001_R1C1.JP2
It happens for example when dumpoverviews tool running:
dumpoverviews IMG_PHR1A_PMS-N_201905050814388_SEN_4485844101-001_R1C1.JP2 3
Starting from level 3 and above it produces errors like:
ERROR 7: Assertion at line 1061 of gdal\frmts\openjpeg\openjpegdataset.cpp failed
ERROR 3: GDALRasterIO read failed at 128.
ERROR 7: Assertion at line 1061 of \gdal\frmts\openjpeg\openjpegdataset.cpp failed
ERROR 3: GDALRasterIO read failed at 256.

Steps to reproduce the problem.

dumpoverviews IMG_PHR1A_PMS-N_201905050814388_SEN_4485844101-001_R1C1.JP2 3

Operating system

Windows 7

GDAL version and provenance

GDAL 2.4.2 version compiled with openjpeg library 2.3.1 using Visual Studio 2017 with WIN64=1

rouault added a commit that referenced this issue Sep 19, 2019
rouault added a commit that referenced this issue Sep 19, 2019
…imensions of the full resolution image are not a multiple of 2^numresolutions (fixes #1860)
rouault added a commit that referenced this issue Sep 19, 2019
…imensions of the full resolution image are not a multiple of 2^numresolutions (fixes #1860)
@rouault
Copy link
Member

rouault commented Sep 19, 2019

Backported to 3.0 and 2.4

@rouault rouault added this to the 2.4.3 milestone Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants