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

fix(png): Fix crash for writing large PNGs with alpha #4074

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Dec 13, 2023

There was a flaw in PNGOutput::write_scanlines when the y range of scanlines to write consisted of less than the whole image, and alpha de-association was needed -- we used the whole-image size instead of the y range of scanlines size.

Fixes #4044

There was a flaw in PNGOutput::write_scanlines when the y range of
scanlines to write consisted of less than the whole image, and alpha
de-association was needed -- we used the whole-image size instead of
the y range of scanlines size.

Fixes PR 4044

Signed-off-by: Larry Gritz <[email protected]>
Copy link
Contributor

@jessey-git jessey-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh! Yeah, can confirm the bug fixed on my end as well. LGTM.

@lgritz lgritz merged commit fd6a195 into AcademySoftwareFoundation:master Dec 13, 2023
25 checks passed
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Dec 13, 2023
…eFoundation#4074)

There was a flaw in PNGOutput::write_scanlines when the y range of
scanlines to write consisted of less than the whole image, and alpha
de-association was needed -- we used the whole-image size instead of the
y range of scanlines size.

Fixes AcademySoftwareFoundation#4044

Signed-off-by: Larry Gritz <[email protected]>
@lgritz lgritz deleted the lg-png branch December 19, 2023 07:52
1div0 pushed a commit to 1div0/OpenImageIO that referenced this pull request Feb 24, 2024
…eFoundation#4074)

There was a flaw in PNGOutput::write_scanlines when the y range of
scanlines to write consisted of less than the whole image, and alpha
de-association was needed -- we used the whole-image size instead of the
y range of scanlines size.

Fixes AcademySoftwareFoundation#4044

Signed-off-by: Larry Gritz <[email protected]>
Signed-off-by: Peter Kovář <[email protected]>
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] Large RGBA PNG write failure
2 participants