Repository navigation
Use panama-media for the macOS image and video backends - #27
Merged
Merged
Conversation
Replace the Apple backends' own CoreFoundation, CoreGraphics, ImageIO and AVFoundation downcalls with the published panama-media 0.1.4 bindings (corefoundation, cgimage, avfoundation), as the Windows backends already do with WIC and Media Foundation. Decoded pixels are byte-identical for still images and for video frames at the source aspect ratio; a frame requested at a different aspect ratio is now scaled down from a larger intermediate instead of up from a smaller one. Native access moves from the imageio modules to the panama-media modules that make the native calls (see the README table). On macOS, a missing grant now reports which modules need native access instead of claiming the platform is unsupported. Bump panama-media from 0.1.1 to 0.1.4 for all backends. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JHHPeMi7jrfjcEgEXqm5gh
ghosthack
added a commit
that referenced
this pull request
Oct 19, 2026
Next release moves the macOS backends onto panama-media 0.1.4 (#27). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JHHPeMi7jrfjcEgEXqm5gh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the macOS backends' own CoreFoundation, CoreGraphics, ImageIO and AVFoundation downcalls with the published panama-media 0.1.4 bindings (
corefoundation,cgimage,avfoundation), the same way the Windows backends already use WIC and Media Foundation. About 900 lines of hand-written bindings go away. All backends move from panama-media 0.1.1 to 0.1.4.Behaviour
getSize, andImageReadParamsubsampling, across HEIC/AVIF/WebP/PNG/JPEG including real camera photos).AppleCoreGraphicsHelperstays public and keeps its signature; it now calls panama-media internally.imageio-native-video-appleno longer depends onimageio-native-apple; it only used it for that helper.Native access (user-visible)
The native calls now happen in the panama-media modules, so native access moves there (README updated):
--enable-native-accessio.github.ghosthack.panama.media.corefoundation,io.github.ghosthack.panama.media.cgimageio.github.ghosthack.panama.media.corefoundation,io.github.ghosthack.panama.media.avfoundationWith the old flag, the JDK's default mode still works (with warnings). Under
--illegal-native-access=denythe old flag fails, and the error now names the modules to grant instead of claiming the OS is not macOS. Windows flags are unchanged (verified underdeny).Verification
verify, all Apple tests pass (59 image, 10 video); a pixel-hash comparison of 75 decode results against 2.0.0 (differences only in the mismatched-aspect video case above); modular app runs under--illegal-native-access=denywith the new flags.verifywith test and skip counts identical tomain; modular app runs underdenywith the documented WIC and Media Foundation flags.Suggested release: 2.1.0 (the native-access change only affects
denymode).🤖 Generated with Claude Code
https://claude.ai/code/session_01JHHPeMi7jrfjcEgEXqm5gh