pixer library
Fast image processing for Dart, backed by Rust.
Start with Pixer to load an image, chain operations, and either Pixer.saveToFile or Pixer.encode the result. Errors throw subclasses of PixerException.
final image = Pixer.fromFile('input.jpg');
final thumb = image.resize(800, 600);
final bytes = thumb.encode(PixerJpegEncoder(quality: 85));
thumb.dispose();
image.dispose();
Classes
- Pixer
- A loaded image, backed by native Rust.
- PixerBmpEncoder
- Encodes an image as BMP.
- PixerEncoder
- Encodes a Pixer image to a specific output format.
- PixerGifEncoder
- Encodes an image as GIF.
- PixerIcoEncoder
- Encodes an image as ICO.
- PixerJpegEncoder
- Encodes an image as JPEG.
- PixerMetadata
- Width, height, and color layout of an image.
- PixerPngEncoder
- Encodes an image as PNG.
- PixerTiffEncoder
- Encodes an image as TIFF.
- PixerWebPEncoder
- Encodes an image as WebP.
Enums
- ColorType
- Pixel layout of an image: which channels are present.
- FilterTypeEnum
- Sampling filter used when resizing.
- ImageFormatEnum
- Image container format used for both decoding and encoding.
Exceptions / Errors
- DecodingException
- Exception thrown when decoding fails
- EncodingException
- Exception thrown when encoding fails
- InvalidDimensionsException
- Exception thrown when dimensions are invalid
- InvalidParameterException
- Exception thrown when an operation parameter is invalid
- InvalidPathException
- Exception thrown when the path is invalid
- InvalidPointerException
- Exception thrown when a null pointer is encountered
- IoException
- Exception thrown when I/O operation fails
- PixerException
- Base exception for pixer errors
- UnknownException
- Exception thrown for unknown errors
- UnsupportedFormatException
- Exception thrown when the format is not supported