Skip to content
Pixer
Esc
navigateopen⌘Jpreview
On this page

Pixer

Fast, cross-platform image manipulation for Dart, powered by Rust.

Pixer provides image resizing, cropping, rotation, adjustments, encoding, and batch processing through one Dart API. Rust does the image work through native FFI or WebAssembly.

Install

Add Pixer to your pubspec.yaml:

dependencies:
  pixer: ^0.0.10

Native binaries are downloaded automatically by Dart build hooks.

Process an image

import 'package:pixer/pixer.dart';

final image = Pixer.fromFile('input.jpg');
try {
  final resized = image.resize(800, 600);
  try {
    resized.saveToFile('output.png');
  } finally {
    resized.dispose();
  }
} finally {
  image.dispose();
}

Every operation returns a new image. The source image is never changed.

What next?

Was this page helpful?