rustydev/pfp
1
0
Fork
You've already forked pfp
0
Code that generates my profile picture
  • Rust 100%
2026年05月31日 10:23:07 +12:00
src Light theme 2026年05月31日 10:23:07 +12:00
.gitignore Cute profile picture 2026年05月30日 21:20:47 +12:00
boykisser.png Light theme 2026年05月31日 10:23:07 +12:00
Cargo.lock Cute profile picture 2026年05月30日 21:20:47 +12:00
Cargo.toml Cute profile picture 2026年05月30日 21:20:47 +12:00
LICENSE Cute profile picture 2026年05月30日 21:20:47 +12:00
out_100b.png Light theme 2026年05月31日 10:23:07 +12:00
out_100b_old.png Light theme 2026年05月31日 10:23:07 +12:00
README.md Light theme 2026年05月31日 10:23:07 +12:00

Profile picture

This repository is used to generate my profile picture using an input boykisser.png that I drew in Krita and some image processing code I wrote in Rust.

How it works:

  1. boykisser.png gets loaded.
  2. Points in the image that aren't white are chosen at random and categorised as being part of the "body" (black) or the "blush" (red).
  3. Many parallel jobs are launched, each job involving a large number of iterations that render points on two canvases, one for the body and another for the blush. Each iteration involves interpolating to a random nearby point and possibly resetting the point to a random point.
  4. The resulting greyscale canvases of these jobs are then merged and a gradient generated from a Bézier curve is used to colour them.
  5. The body and blush canvases after the gradient is applied are combined and the output is generated.

Building

To create the profile picture, run cargo run --release in the project's root directory. Make sure to run in release mode, especially if you drastically increase the number of iterations.

Input

Input boykisser image, white background, black foreground with red blushing.

Output

Here is the output you get with 100 billion iterations. This took nearly an hour to generate on my machine. The default number of iterations is 100 million.

Output boykisser image, white background, magenta/pink foreground with red blushing.

Alternative

Here's an older version of the profile picture.

Output boykisser image, black background, magenta/pink foreground with red blushing.

License

Both the input image and the code is licensed under the GNU AGPLv3.

I would like to use the original boykisser image, but that is under an unknown license. I drew boykisser.png using the original boykisser as inspiration and a helpful reference.