esimov/stackblur-go
À propos
A fast, almost Gaussian Blur implementation in Go
Design et médiasProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
Originalstackblur-go
Go port of Mario Klingemann's Stackblur algorithm.
Stackblur is a compromise between Gaussian blur and Box blur, but it creates much better looking blurs than Box blur and it is ~7x faster than Gaussian blur.
Comparing to the Javascript implementation the Go version is at least 50% faster (depending on the image size and blur radius), applied on the same image with the same bluring radius.
Benchmark
| Radius | Javascript | Go |
|---|---|---|
| 20 | ~15ms | ~7.4ms |
Installation
$ go install github.com/esimov/stackblur-go/cmd/stackblur@latest
CLI example
The provided CLI example supports the following flags:
$ stackblur --help
Usage of stackblur:
-gif
Output Gif
-in string
Source
-out string
Destination
-radius int
Radius (default 20)
The command below will generate the blurred version of the source image.
$ stackblur -in image/sample.png -out image/output.png -radius 10
The cli command supports a -gif flag, which if set as true it visualize the bluring process by outputting the result into a gif file.
API
The usage of the API is very simple: it exposes a single public Process function which requires a destination and a source image together with a blur radius. The blured image will be encoded into the destination image.
stackblur.Process(dst, src, blurRadius)
Results
| Original image | Blurred image |
|---|---|
![]() |
![]() |
License
This project is under the MIT License. See the LICENSE file for the full license text.
Explorer des projets similaires
Chargement…

