A small and fast rust tool which can blur
images with cool features like:
When I lock my computer or laptop, I love it to take a screenshot of the current state, blur the image and set the blured image as lock screen. So that's it, just a small tool which blurs images. :)
If you are using i3, you can install the cliblur
and create a small bash script
to create a screenshot, blur it and lock your screen. :)
```bash
cd "$(dirname "$0")"
IMAGE=/tmp/lock.png
scrot -q 100 $IMAGE cliblur $IMAGE i3lock -i $IMAGE rm $IMAGE ```
Because convert is very slow ... I mean really slow ... I love it take a screenshot, blur it and set it as my locking screen, but convert is so damn so. It takes 2 seconds on 16 cores (and yes, all of them are running...). \ So I created this small tool, it's finishing the blur effect in just ~460ms and takes one thread (instead of 16 threads with 100%). :)
It's working out of the box with default parameters. You just need to to run the command and specify the file:
bash
cliblur /tmp/lock.png
Keep in mind, if you're just set the input file, the same file will be overwritten! You can avoid that by writing the destination file, as you can see here.
bash
fastsar /tmp/lock.png /tmp/bluredlock.png
You can modify the settings for the blur effect.
There is a scale
which can be changed, so the blur will be increased/decreased.
And by the way, you can also change the scale down and scale up filter.
It's looking kinda 8-bit like if you use the gaussian
filter for scale down
and the nearest
for scaling up
.
If you just wanna blur the image, you can use the gaussian
filter for
scale down
and scale up
.
Just try a little bit around until you find something that's fits.
There are two ways to install it, you can build it yourself or you just instal the compiled version from gitlab (which will always be the latest version). \ The binary version can be downloaded here. \
It's really easy! For real, trust me. :3 \
```bash
curl -L https://gitlab.com/kerkmann/cliblur/-/jobs/artifacts/main/raw/cliblur\?job\=release --output cliblur
chmod +x cliblur
/usr/local/bin/cliblur
sudo cp cliblur /usr/local/bin/cliblur ```
You are not trusting the pre built binary? Thankfully, you can build it yourself! :3
```bash
git clone https://gitlab.com/kerkmann/cliblur
cd cliblur
cargo build --release
upx --best --lzma target/release/cliblur
chmod +x target/release/cliblur
/usr/local/bin/cliblur
sudo cp target/release/cliblur /usr/local/bin/cliblur ```