cliblur

codecov

A small and fast rust tool which can blur images with cool features like:

What is the benefit from using this tool?

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. :)

How to blur and lock the screen

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

!/usr/bin/env bash

cd "$(dirname "$0")"

IMAGE=/tmp/lock.png

scrot -q 100 $IMAGE cliblur $IMAGE i3lock -i $IMAGE rm $IMAGE ```

Why are you not using convert?

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%). :)

How to use it

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.

Install

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. \

Install compiled version

It's really easy! For real, trust me. :3 \

```bash

download the binary file

curl -L https://gitlab.com/kerkmann/cliblur/-/jobs/artifacts/main/raw/cliblur\?job\=release --output cliblur

make file executable

chmod +x cliblur

just copy the binary file to /usr/local/bin/cliblur

sudo cp cliblur /usr/local/bin/cliblur ```

Build it yourself

You are not trusting the pre built binary? Thankfully, you can build it yourself! :3

```bash

clone the project

git clone https://gitlab.com/kerkmann/cliblur

change into the directory

cd cliblur

compile it yourself

cargo build --release

(optional) make the binary smaller

upx --best --lzma target/release/cliblur

make file executable

chmod +x target/release/cliblur

just copy the binary file to /usr/local/bin/cliblur

sudo cp target/release/cliblur /usr/local/bin/cliblur ```

Things to do