Skip to content

Build against & use libpng 1.5+#2

Open
spillner wants to merge 1 commit intohaegar:masterfrom
spillner:master
Open

Build against & use libpng 1.5+#2
spillner wants to merge 1 commit intohaegar:masterfrom
spillner:master

Conversation

@spillner
Copy link

Libpng 1.4 deprecated and libpng 1.5 finally abolished the direct access to the png_info structure that xv was using. There are a couple of other forks on GH that claim to build and work against modern libpng but some of the diffs looked a little shaky to me so I thought I'd start from scratch.

I did make some changes to the PNG comment handling, which appears to have been bugged in legacy xv (the tp pointer was not properly initialized in WritePNG if max_text was already > num_text, and the pointer was not properly advanced when adding non-keyword comments). Other than that the changes are solely what's required by the libpng changes, although it's tempting to start a wider cleanup effort. I also commented out the jasper (JPEG 2000 library) dependency in the Makefile, which lets this build on modern distributions where libjasper is not always easily available.

Built & tested against libpng 1.6.37 on Debian Bullseye (11.4), for both reading and writing.

…n libjasper. Likely fixed some longstanding bugs with PNG comment handling, which wasn't correct in the old code but was on a rarely-triggered code path. This version of xv compiles & runs on Debian Bullseye and other modern Linux/Unixes.
@rebroad
Copy link

rebroad commented Nov 25, 2024

I applied this patch but it still isn't rending png files.

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.

2 participants