All notable changes to this project will be documented in this file.
- PNG compression ~55% faster — New Bigrams filter strategy for
FilterStrategy::Allsignificantly improves Max preset performance - Improved LZ77 compression — Enhanced match selection logic for better compression ratios
- Test coverage increased to 86% — Expanded test suite for better reliability
- BREAKING: PNG/JPEG/Resize APIs now use builder pattern — Unified, cleaner, more extensible API
- All encode functions now take
(data, &options)instead of positional arguments - Width, height, and color type are now part of the options struct
- Use
PngOptions::builder(w, h).color_type(...).build()to configure PNG - Use
JpegOptions::builder(w, h).color_type(...).quality(85).build()to configure JPEG - Use
ResizeOptions::builder(src_w, src_h).dst(dst_w, dst_h).build()to configure resize
- All encode functions now take
Before (0.3.x):
// PNG
png::encode(&pixels, width, height, ColorType::Rgba)?;
png::encode_with_options(&pixels, width, height, ColorType::Rgba, &options)?;
// JPEG
jpeg::encode(&pixels, width, height, quality)?;
jpeg::encode_with_options(&pixels, width, height, ColorType::Rgb, &options)?;After (0.4.0):
// PNG
let opts = PngOptions::builder(width, height).color_type(ColorType::Rgba).build();
png::encode(&pixels, &opts)?;
// JPEG
let opts = JpegOptions::builder(width, height)
.color_type(ColorType::Rgb)
.quality(85)
.build();
jpeg::encode(&pixels, &opts)?;png::encode_with_options()— usepng::encode()with builder optionsjpeg::encode_with_options()— usejpeg::encode()with builder optionsjpeg::encode_with_color()— use builder.color_type()methodjpeg::encode_with_options_into()— usejpeg::encode_into()timingfeature flag — unused profiling feature removed to reduce maintenance burden
PngOptions::builder(width, height)— builder pattern for PNG optionsJpegOptions::builder(width, height)— builder pattern for JPEG optionsPngOptionsBuilder::color_type()— set color type in builderJpegOptionsBuilder::color_type()— set color type in builder- Preset helpers now require dimensions:
PngOptions::fast(w, h),JpegOptions::fast(w, h, quality)
- Image Resizing API — New
resizemodule for high-quality image resizing- Three algorithms:
Nearest(fastest),Bilinear(balanced),Lanczos3(highest quality, default) - Support for all color types: Gray, GrayAlpha, RGB, RGBA
resize()for simple usage,resize_into()for buffer reuse- Separable filtering with precomputed contributions for O(2n) per-pixel performance
- Parallel processing support via the
parallelfeature flag
- Three algorithms:
use pixo::{resize, ColorType, ResizeAlgorithm};
// Resize a 100x100 RGBA image to 50x50 using Lanczos3
let pixels = vec![128u8; 100 * 100 * 4];
let resized = resize::resize(
&pixels, 100, 100, 50, 50,
ColorType::Rgba,
ResizeAlgorithm::Lanczos3,
)?;- WASM Resize Support —
resizeImage()function in WASM bindings- Aspect ratio preservation option
- Algorithm selection (nearest, bilinear, lanczos3)
- Documentation link fixes for GitHub and docs.rs compatibility
- PNG encoder with all filter types and DEFLATE compression
- JPEG encoder with baseline and progressive modes
- Lossy PNG via palette quantization
- Trellis quantization for JPEG
- SIMD acceleration (x86_64 AVX2/SSE, aarch64 NEON)
- WASM bindings with 149 KB binary size
- CLI tool for command-line compression
- PNG/JPEG decoding support
- Comprehensive documentation and guides
- Initial release
- Core compression algorithms (Huffman, LZ77, DEFLATE)
- Basic PNG and JPEG encoding