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

TIFF: Fix spec() and spec_dimensions() for mipmapped tiff files #2723

Merged
merged 1 commit into from Sep 26, 2020

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Sep 26, 2020

For "mip-mapped" TIFF files where we use the multiple images in the file
to emulate MIP-maps rather than what we ordinarily consider subimages,
a call to ImageInput::spec(subimage,miplevel) was not properly
recognizing invalid subimage values and returning an empty ImageSpec
as advertised. Basically, we assumed that they would only ask for a
valid subimage and miplevel and didn't properly handle out of range
values.

Same problem for spec_dimensions().

Fixes #2719

Signed-off-by: Larry Gritz lg@larrygritz.com

For "mip-mapped" TIFF files where we use the multiple images in the file
to emulate MIP-maps rather than what we ordinarily consider subimages,
a call to `ImageInput::spec(subimage,miplevel)` was not properly
recognizing invalid subimage values and returning an empty ImageSpec
as advertised. Basically, we assumed that they would only ask for a
valid subimage and miplevel and didn't properly handle out of range
values.

Same problem for spec_dimensions().

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz lgritz merged commit 6a9bf72 into AcademySoftwareFoundation:master Sep 26, 2020
@lgritz lgritz deleted the lg-tiffspec branch September 26, 2020 22:02
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Sep 26, 2020
…emySoftwareFoundation#2723)

For "mip-mapped" TIFF files where we use the multiple images in the file
to emulate MIP-maps rather than what we ordinarily consider subimages,
a call to `ImageInput::spec(subimage,miplevel)` was not properly
recognizing invalid subimage values and returning an empty ImageSpec
as advertised. Basically, we assumed that they would only ask for a
valid subimage and miplevel and didn't properly handle out of range
values.

Same problem for spec_dimensions().

Signed-off-by: Larry Gritz <lg@larrygritz.com>
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

Successfully merging this pull request may close these issues.

[BUG] Incorrect subimages for TX files
1 participant