Releases: HugoSmits86/nativewebp
nativewebp v1.2 – Animation Support and More Stability
We’re excited to announce nativewebp v1.2, bringing WebP animation support and important stability improvements to our WebP encoder!
-
Full WebP Animation Support
You can now encode full WebP animations with multiple frames, custom durations, disposal methods, looping, and background color settings. The new EncodeAll function makes it easy to create high-quality animations with full VP8X container support, all fully native in Go! -
Stability and Encoding Improvements
Minor optimizations and stricter validation checks have been added across the board, ensuring even more robust encoding for a wider range of images and animations.
Thank you once again for being part of the journey, your feedback and feature requests keep making nativewebp better with every release. As always; Happy encoding! 🎉
v1.1.4
We know we’ve been releasing a lot of small updates lately, apologies for that! But WebP images in the wild come in so many different variations that edge cases keep popping up. Our goal is to make decoding as smooth as possible, and these incremental improvements help refine support for all the quirks of WebP.
Changes in v1.1.4:
DecodeIgnoreAlphaFlag(r io.Reader) now detects VP8L automatically
Previously, users had to manually check if an image was VP8 or VP8L before deciding whether to call DecodeIgnoreAlphaFlag(r io.Reader) or Decode(r io.Reader). Now, the function automatically scans for the VP8L chunk in VP8X files and only clears the alpha flag when necessary. This means users can safely pass all images through DecodeIgnoreAlphaFlag(r io.Reader) without worrying about breaking VP8 image decoding.
v1.1.3 – Fix for VP8X Alpha Flag Issue
We pulled v1.1.1 and v1.1.2 after realizing the VP8X issue was due to the alpha flag in the header. Instead of modifying Decode(r io.Reader), we introduced DecodeIgnoreAlphaFlag(r io.Reader), which clears the alpha flag before decoding VP8X images.
Why?
Lossless WebP (VP8L) handles transparency internally, but the WebP spec requires the alpha flag when transparency is present. golang.org/x/image/webp incorrectly expects an ALPHA chunk, rejecting valid VP8X/VP8L images.
Changes in v1.1.3
- New:
DecodeIgnoreAlphaFlag(r io.Reader), which fixes the issue. - Updated:
Decode(r io.Reader)is now a clean wrapper. - Pulled:
v1.1.1&v1.1.2for a better solution.
This keeps decoding efficient while ensuring VP8X images load correctly. 🚀
nativewebp v1.0 – Smarter Compression, Seamless Integration, and Bug Fixes
We’re thrilled to announce nativewebp v1.0, marking a major milestone for our WebP encoder! This release brings smarter compression, better Go integration, and an important bug fix to make encoding faster and more reliable.
-
Smarter Compression with Predictor Transform
We’ve added filter selection for Predictor Transform, which dynamically analyzes block entropy and selects the best filter for each block. This greatly improves compression efficiency while keeping encoding fast. -
Seamless Go Integration for Decoding
Thanks to @Achno, nativewebp now includes a wrapper for golang.org/x/image/webp, so you can use Decode and image.Decode out of the box without manually importing golang.org/x/image/webp. -
Bug Fixes
We’ve resolved an important Huffman bug that could lead to invalid trees, ensuring more reliable encoding.
Thank you for your support, this milestone wouldn’t have been possible without the community’s feedback and contributions.
Happy encoding! 🎉
Initial LZ77 Compression Support
We're excited to introduce the initial support for LZ77 compression in nativewebp! This update lays the groundwork for more efficient file compression, while still keeping our encoding speed lightning fast.
-
Initial Integration of LZ77
The encoder now uses the LZ77 algorithm to identify and compress repeating patterns, which leads to significantly smaller file sizes. -
Looking Ahead
This is just the beginning. We plan to continuously enhance both the speed and compression quality of our LZ77 implementation in future releases. -
Seamless Performance
Enjoy improved compression without compromising on the rapid encoding performance nativewebp is known for.
Thank you for your support and feedback as we continue to evolve and refine nativewebp. Happy compressing!
Improved documentation, codecov Integration, and API cleanup
New Features
- Color Transform Support
Added functionality to handle color transformations, paving the way for more advanced image processing capabilities.
Improvements
-
Codecov Integration
Implemented a GitHub Actions workflow to integrate Codecov for test coverage reporting, providing improved visibility into code quality. -
Documentation
Added detailed GoDoc for the Encode function, improving code readability and developer understanding.
Bug Fixes
- Unexported Types Correction
Resolved an issue where BitWriter and HuffmanCode were unintentionally exported. These types are now correctly unexported, adhering to Go's best practices and ensuring a cleaner API.
New Features and Fixes!
New Features
-
Color Indexing Support
Added support for color-indexed images, enhancing encoding efficiency and compatibility. -
Predict Transform Filters
Implemented all filters required for the predict transform functionality.
Current Status: The filter selection is fixed at 1 as a placeholder.
What’s Next: A dynamic and smart filter selection mechanism will be developed in a future update.
Bug Fixes
-
Public Function Cleanup
Resolved an issue where some functions were unintentionally left public. These have now been made private, ensuring cleaner API boundaries. -
Bounds Reset in NRGBA Conversion
Fixed issue #3: Bounds were not reset to (0, 0) after converting an image to NRGBA, leading to unexpected behavior during encoding. Bounds are now explicitly reset with image.Rect(0, 0, Dx, Dy). Updated draw.Draw to ensure correct pixel alignment.
finally a native webp encoder for Go!
Supported Format: VP8L (Lossless WebP).
Features:
- Color Cache Bits: Optimized for color reuse and compression.
- Filters: Includes Subtract Green and prediction filters for improved compression.
- Compression: Supports Huffman coding for efficient data representation.