{"id":21206252,"url":"https://github.com/rtmigo/stack_blur_dart","last_synced_at":"2026-05-11T07:28:06.490Z","repository":{"id":56840422,"uuid":"441764602","full_name":"rtmigo/stack_blur_dart","owner":"rtmigo","description":"Dart library with stack blur algorithm for RGBA images","archived":false,"fork":false,"pushed_at":"2021-12-26T20:42:35.000Z","size":4735,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"staging","last_synced_at":"2025-06-17T08:44:05.071Z","etag":null,"topics":["blur","dart","filter","flutter","image","image-processing","imaging"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/stack_blur","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rtmigo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-25T21:54:48.000Z","updated_at":"2024-05-17T18:39:41.000Z","dependencies_parsed_at":"2022-08-29T07:42:22.960Z","dependency_job_id":null,"html_url":"https://github.com/rtmigo/stack_blur_dart","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/rtmigo/stack_blur_dart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtmigo%2Fstack_blur_dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtmigo%2Fstack_blur_dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtmigo%2Fstack_blur_dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtmigo%2Fstack_blur_dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtmigo","download_url":"https://codeload.github.com/rtmigo/stack_blur_dart/tar.gz/refs/heads/staging","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtmigo%2Fstack_blur_dart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273973705,"owners_count":25200575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blur","dart","filter","flutter","image","image-processing","imaging"],"created_at":"2024-11-20T20:54:59.734Z","updated_at":"2026-05-11T07:28:01.466Z","avatar_url":"https://github.com/rtmigo.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Generic badge](https://img.shields.io/badge/status-it_works-ok.svg)\n[![Pub Package](https://img.shields.io/pub/v/stack_blur.svg)](https://pub.dev/packages/stack_blur)\n[![pub points](https://badges.bar/stack_blur/pub%20points)](https://pub.dev/packages/stack_blur/score)\n\n# [stack_blur](https://github.com/rtmigo/stack_blur_dart)\n\nThe Dart library for blurring images with the Stack blur algorithm.\n\nThe [Stack blur](https://underdestruction.com/2004/02/25/stackblur-2004/) works fast and looks good.\nIt is a compromise between [Gaussian blur](https://en.wikipedia.org/wiki/Gaussian_blur)\nand [Box blur](https://en.wikipedia.org/wiki/Box_blur).\n\nThis library modifies a raw buffer containing RGBA pixels. This is \"low-level\", but universal and\ndoes not impose external dependencies.\n\n## Use with [image](https://pub.dev/packages/image) library\n\n```dart\nimport 'dart:io';\n\nimport 'package:image/image.dart';  // third-party library\nimport 'package:stack_blur/stack_blur.dart';\n\nvoid main() {\n  // loading image from file\n  final image = decodeImage(File('source.png').readAsBytesSync())!;\n  Uint32List rgbaPixels = image.data;\n\n  // blurring image pixels with blur radius 42\n  stackBlurRgba(rgbaPixels, image.width, image.height, 42);\n\n  // saving image to file\n  File('blurred.png').writeAsBytesSync(encodePng(image));\n}\n```\n\n## Use with Flutter and [bitmap](https://pub.dev/packages/bitmap) library\n\nFlutter images have the same RGBA pixel buffer. You can get it in a rather non-obvious\nway through `ImageStreamListener`.\n\n``` dart\nimport 'dart:ui' as ui;\nimport 'package:flutter/material.dart';\nimport 'package:bitmap/bitmap.dart';  // third-party library\nimport 'package:stack_blur/stack_blur.dart';\n\nFuture\u003cImage\u003e blurAsset(String assetName) async {\n  ImageProvider provider = ExactAssetImage(assetName);\n\n  // Rain dance to get RGBA pixels from image\n  final ImageStream stream = provider.resolve(ImageConfiguration.empty);\n  final completer = Completer\u003cui.Image\u003e();\n  late ImageStreamListener listener;\n  listener = ImageStreamListener(\n    (frame, _) {\n        stream.removeListener(listener);\n        completer.complete(frame.image);\n    },\n    onError: (error, stack) {\n        stream.removeListener(listener);\n        completer.completeError(error, stack);\n    });\n  stream.addListener(listener);\n  ui.Image image = await completer.future;\n  ByteData rgbaData = (await image.toByteData(format: ui.ImageByteFormat.rawRgba))!;\n\n  // These are the pixels we needed\n  Uint32List rgbaPixels = rgbaData.buffer.asUint32List();\n\n  // Now we can blur the image buffer\n  stackBlurRgba(rgbaPixels, image.width, image.height, 42);\n\n  // We use a third-party 'bitmap' library to turn the buffer into a widget\n  final bitmap = Bitmap.fromHeadless(\n      image.width, image.height,\n      rgbaPixels.buffer.asUint8List());\n  return Image.memory(bitmap.buildHeaded());\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtmigo%2Fstack_blur_dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtmigo%2Fstack_blur_dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtmigo%2Fstack_blur_dart/lists"}