Add WebP codec module with FFM-based platform backends and bundled ar…#13
Merged
dima-dencep merged 22 commits intomainfrom Mar 9, 2026
Merged
Add WebP codec module with FFM-based platform backends and bundled ar…#13dima-dencep merged 22 commits intomainfrom
dima-dencep merged 22 commits intomainfrom
Conversation
…tifact New `webp` module providing WebP encode/decode via Java 25 FFM API: - libwebp backend (cross-platform, if library available) - macOS ImageIO (CoreGraphics) backend - Windows WIC backend - Java ImageIO fallback (works with TwelveMonkeys plugin) - Bundled artifact with shaded+ProGuard-optimized TwelveMonkeys (~146K) - Testing UI with backend probing, encode/decode tests, and file preview - Updated README with WebP documentation and usage examples Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix CoInitializeEx invokeExact return type mismatch (WrongMethodTypeException) - Add libwebp-7 to library search names (MinGW/MSYS2 SONAME convention) - Configure testing module with shadow fat JAR and Main-Class manifest - Use ProGuard-optimized bundled webp artifact in testing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch all encoder/decoder backends from byte[] RGBA to int[] ARGB — the native Java2D pixel format. This eliminates all manual byte-level pixel conversion and enables trivial interop with BufferedImage. - Extract DecodedImage from inner record to standalone class with toPng(), fromPng(), and isPngCached() methods (PNG caching) - Add isWebP() detection to PlatformWebPDecoder with backend overrides - libwebp: use WebPDecodeARGB/WebPEncode*BGRA (int[] ARGB = BGRA on LE) - macOS: use kCGBitmapByteOrder32Little|kCGImageAlphaFirst for encoding - Windows WIC: use GUID_WICPixelFormat32bppBGRA (native int[] = ARGB) - Java ImageIO: use getRGB()/setRGB() directly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d test suite - Replace buggy TwelveMonkeys VP8 decoder (43% pixel errors, issue #785) with ngengine image-webp-java pure Java WebP decoder - pixel-exact on all test images - Add 9 diverse test images (gradients, alpha, noise, checkerboard, solid, tall/wide) with libwebp reference PNGs for pixel-exact verification - Parameterize all backend tests (NgEngineDecoderTest, MacOSImageIOTest, WindowsWICTest, CrossBackendTest) over the full image set - Fix macOS ImageIO decoder bug: handle kCGImageAlphaNoneSkipLast (RGBX) format for opaque WebP images - Add NgEngineDecoder to CrossBackendTest for cross-backend pixel comparison - Remove JavaImageIODecoder, JavaImageIOEncoder and related ImageIO SPI config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
…tifact
New
webpmodule providing WebP encode/decode via Java 25 FFM API: