stack_blur 0.2.2 stack_blur: ^0.2.2 copied to clipboard
Fast and beautiful image blurring algorithm for raw RGBA pixel buffers.
import 'dart:io';
import 'package:image/image.dart';
import 'package:stack_blur/stack_blur.dart';
void main() {
// loading image from file
final image = decodeImage(File('source.png').readAsBytesSync())!;
// blurring image pixels with blur radius 42
stackBlurRgba(image.data, image.width, image.height, 42);
// saving image to file
File('blurred.png').writeAsBytesSync(encodePng(image));
}