pixer 0.0.12
pixer: ^0.0.12 copied to clipboard
High-performance Dart image manipulation backed by Rust FFI for resizing, cropping, encoding, and thumbnail generation in apps and tools.
0.0.12 #
- Native binaries no longer include image codecs outside the supported formats (AVIF, EXR, HDR, QOI, TGA, DDS, PNM, Farbfeld), shrinking them by roughly 60% (macOS arm64: 4.9 MB to 1.8 MB). Auto-detected loading of those formats now throws
UnsupportedFormatException. - Added the
formatshook user define to compile in only selected formats. Setting it builds the native library from source and requires a Rust toolchain. - Resizing 8-bit images is 10–15x faster on native platforms: it now uses SIMD and splits large images across CPU cores (Apple M-series: 4K Lanczos3 upscale from 90 ms to 7 ms). 16-bit and floating-point images use the previous resizer.
- Resizing images with alpha now premultiplies alpha, so transparent pixels no longer bleed color into edges. Resized pixel values differ slightly from previous versions.
- Breaking: Loaded images are now rotated and flipped upright according to their EXIF orientation, so
widthandheightare swapped for photos taken in portrait orientation. Malformed EXIF data is ignored.
0.0.11 #
- Breaking: Operations on
Pixer(resize,crop,blur, ...) now return a lazyPixerPipelineinstead of a newPixer. Chain operations and finish withencode,saveToFile, ortoImage(); the whole chain runs in one native call. Add.toImage()where aPixeris still needed. - Breaking: Removed
Pixer.batch()and renamedPixerBatchtoPixerPipeline. Pipelines are now immutable, so branching from a shared prefix no longer leaks operations between branches. - Breaking: Image-dependent errors such as out-of-bounds
cropare now thrown by the terminal call, not by the operation. Argument validation still happens when an operation is added. - Breaking: Merged
Pixer.fromMemoryWithFormat(data, format)intoPixer.fromMemory(data, format: format). - Exported
ImageErrorCode, the type ofPixerException.code. encodeandsaveToFilenow run through the pipeline path, so native failures raise specific exceptions (e.g.InvalidDimensionsException) instead ofUnknownException. Out-of-boundscropis now reported by the native engine.- Pipelines validate every operation before processing any pixels.
- Downloaded binaries are now verified with SHA-256 instead of MD5.
- Breaking (native ABI 2): Reduced the C API to
pixer_load,pixer_load_from_memory(format orPIXER_FORMAT_DETECT),pixer_get_metadata, and thepixer_batch_*functions. Every fallible function returns anImageErrorCodeand writes results through out-parameters; formats are passed as validatedu32values. Rebuild binaries for this package revision.
0.0.10 #
-
Fixed zero blur changing pixels and rejected subnormal blur values before they can panic in Rust.
-
Preserved alpha and bit depth in grayscale conversion and prevented extreme brightness offsets from overflowing.
-
Accounted for actual native pixel-buffer bytes, including 16-bit and floating-point images.
-
Added native/WASM ABI version checks and compile-time WASM layout checks. Rebuild binaries for this package revision.
-
Added a minimal Flutter showcase for Android, iOS, Linux, macOS, Windows, and WebAssembly.
-
Added browser support backed by the Rust engine compiled to WebAssembly.
-
Added
Pixer.initialize()for loading the WebAssembly module on web. -
Shared image validation, batching, encoder configuration, and error mapping across native and web backends.
-
Encoding now belongs to the image backend; use
Pixer.encode(encoder)instead of the FFI-onlyPixerEncoder.encode(handle)helper. -
Breaking: Renamed the native encoding symbols to
pixer_encode,pixer_encode_jpeg, andpixer_batch_encode; the JPEG function no longer takes a redundant format argument.
0.0.9 #
- Fixed the workspace benchmark package path so analysis and publish validation run successfully.
- Added lazy operation batches with
toImage(),encode(), andsaveToFile()terminals.
0.0.8 #
- Provide example and improve pubdev points.
0.0.7 #
- Added externalSize to the NativeFinalizer, which significantly improves Garbage Collection performance.
0.0.6 #
- Breaking: Merged
Pixer.encodeWith(PixerEncoder)intoPixer.encode(PixerEncoder); the oldencode(ImageFormatEnum)overload is gone. Useimage.encode(const PixerPngEncoder())etc. - Breaking: Renamed
ColorType.l/ColorType.latoColorType.luminance/ColorType.luminanceAlpha.ColorType.fromValuenow throwsArgumentErroron unknown codes instead of defaulting torgba. - Breaking: Removed unused
LoadException(load failures already throw specific exceptions). - Fixed:
Pixer.contrastdocs:0.0is the neutral value (not1.0). - Docs: Clarified
Pixer.resizesemantics (fits within the bounds; useresizeExactfor exact sizes). - Docs: Documented
Pixer.brightnessclamping and practical range. - Docs: Added doc comments to all generated
FilterTypeEnum,ImageFormatEnum, andImageErrorCodevariants via the Rust source. - Refactor: Replaced
native_toolchain_rswithnative_toolchain_rust. - Refactor: Simplified Rust code, removed
api.rs. - Refactor: Simplified encoder API and native implementation to keep only JPEG quality as a configurable encoding option.
- Refactor: Marked
PixerMetadatafinal.
0.0.5 #
- Breaking: Replaced
Pixer.encode(ImageFormatEnum, {quality})with encoder objects. - Added
PixerJpegEncoder(quality: ...)with validation.
0.0.4 #
- Added JPEG quality support to
Pixer.encode()viaquality. - Improved binding generation to resolve the active macOS SDK with
xcrun.
0.0.3 #
- Fixed build hook for web platform.
0.0.2 #
- Breaking:
invert()now returns a newPixerinstead of mutating in-place. - Breaking: Removed deprecated
resizeToFit()method (useresize()instead). - Breaking: Renamed FFI functions to align with Rust image crate conventions:
encode->write_tocrop->crop_immrotate_90/180/270->rotate90/180/270flip_horizontal/vertical->fliph/flipvbrightness->brightencontrast->adjust_contrast
- Added metadata caching to avoid redundant FFI calls for
width,height,colorType. - Added bounds validation for
crop()- now throwsInvalidDimensionsExceptionif crop rectangle exceeds image bounds. - Added hash verification for native assets.
- Added
generate_bindings.shscript to automate cbindgen + ffigen workflow. - Improved error handling in load functions - now throws specific exceptions (
IoException,DecodingException,UnsupportedFormatException) instead of genericLoadException. - Improved documentation for
blur()method.
0.0.1 #
- Finalized the Dart API with typed exceptions.
- Added context to exceptions for clearer error messages.
- Added a finalizer and
isDisposedfor safer resource handling.