Skip to content

ENH: Update PNG to v1.6.54#5864

Merged
blowekamp merged 4 commits intoInsightSoftwareConsortium:mainfrom
blowekamp:update_png
Mar 7, 2026
Merged

ENH: Update PNG to v1.6.54#5864
blowekamp merged 4 commits intoInsightSoftwareConsortium:mainfrom
blowekamp:update_png

Conversation

@blowekamp
Copy link
Member

@blowekamp blowekamp commented Mar 5, 2026

This PR updates the PNG (libpng) third-party library from version v1.6.44 to v1.6.54.

Summary

  • Updated UpdateFromUpstream.sh to tag v1.6.54
  • Ran the update script to merge upstream changes
  • Resolved merge conflict in pngconf.h
  • Updated symbol mangling for 10 new public API functions

Changes

  • Version bump: v1.6.44 → v1.6.54 (10 minor releases)
  • Security fixes and improvements from upstream
  • Removed obsolete old Borland/MSVC compiler workarounds
  • Bug fixes and performance improvements

Conflict Resolution

A merge conflict occurred in Modules/ThirdParty/PNG/src/itkpng/pngconf.h:

  1. Top of file: Preserved ITK's #include "itk_png_mangle.h" which is critical for symbol mangling
  2. DLL export block: Accepted upstream's removal of old Borland and early MSVC compiler workarounds, simplifying to modern __declspec(dllexport/dllimport) handling

Symbol Mangling Updates

Added 10 new public API functions to itk_png_mangle.h.in (new in v1.6.45–v1.6.54):

  • png_get_cICP / png_set_cICP — ICC Profile chunk
  • png_get_cLLI / png_set_cLLI / png_get_cLLI_fixed / png_set_cLLI_fixed — Content Light Level Information
  • png_get_mDCV / png_set_mDCV / png_get_mDCV_fixed / png_set_mDCV_fixed — Mastering Display Color Volume

Notes

  • Generated using the update-third-party skill
  • All ITK-specific modifications preserved

Upstream releases: https://github.com/pnggroup/libpng/releases (v1.6.45 through v1.6.54)

@github-actions github-actions bot added area:ThirdParty Issues affecting the ThirdParty module type:Data Changes to testing data labels Mar 5, 2026
@blowekamp blowekamp changed the title Update png ENH: Update PNG to v1.6.54 Mar 5, 2026
@dzenanz
Copy link
Member

dzenanz commented Mar 5, 2026

PR description is good and so detailed that I suspect AI was involved in writing it. Did AI do anything else, such as resolve those merge conflicts?

@dzenanz
Copy link
Member

dzenanz commented Mar 5, 2026

Ah, I now notice "Generated using the update-third-party skill", after seeing it in #5865 too. Updating third party libraries was time consuming. I guess AI can help there. How much time do you devote to reviewing merge conflict resolution?

@blowekamp
Copy link
Member Author

@dzenanz Please see #5867 for the Agent skill I work on while making the updates.

For libpng, I don't think there were any conflict. But with the skills instructions in pick up on the command in itk_png_mangle.h.in, and followed those to update the mangling.

In VS code I was able too see some of the conflict and the changes made. I am not sure I saw them all but with the provided instructions Clause Sonnet 4.5 seems to do a good job.

blowekamp and others added 4 commits March 6, 2026 18:27
Code extracted from:

    git://git.code.sf.net/p/libpng/code

at commit 02f2b4f4699f0ef9111a6534f093b53732df4452 (v1.6.54).
* upstream-png:
  png 2026-01-12 (02f2b4f4)

# Conflicts:
#	Modules/ThirdParty/PNG/src/itkpng/pngconf.h
Added mangling definitions for new API functions introduced between
v1.6.44 and v1.6.54:
- png_get_cICP / png_set_cICP
- png_get_cLLI / png_set_cLLI / png_get_cLLI_fixed / png_set_cLLI_fixed
- png_get_mDCV / png_set_mDCV / png_get_mDCV_fixed / png_set_mDCV_fixed
@github-actions github-actions bot added the type:Enhancement Improvement of existing methods or implementation label Mar 6, 2026
@blowekamp blowekamp merged commit 59d7a8a into InsightSoftwareConsortium:main Mar 7, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ThirdParty Issues affecting the ThirdParty module type:Data Changes to testing data type:Enhancement Improvement of existing methods or implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants