Thanks for visiting my awesome website!!!
I'm interested in maths and computer science, specifically compiler/language design, functional programming, high performance/system's programming and other things, which have nothing to do with computers.
This page shows some of my projects.
Link: https://github.com/LilyRL/sge
Written in Rust and designed to be as simple and easy to use as possible, without requiring significant knowlage of the Rust langauge. Lots of documentation in the form of a book explaining the features and systems, and 74 (at time of writing) examples if you prefer.
It's got:That's the best one by far, but I do have more...
Link: https://github.com/LilyRL/sge
Written in C. I wanted to try my hand at creating an image format with lossy compression, without doing much research on how other image formats worked. I did notice that jpegs seem to be split into tiles, which gave me the idea to use a tile based approach in my own format. I'm not great at C so the code isn't amazingly well organised. The files starting with stb_* and the harness.c were not written by me.
First, it checks if the image contains any transparency, and if it doesn't we set a flag at the start of the file and use RGB instead of RGBA for the rest of the file, saving space.
Then it splits the image into 8x8 tiles, and checks if each follows one of these criteria. It does this by computing the sum of the difference squared between the actual image data, and how it will look when decoded.
In the case of a tile that will be encoded using a solid block or gradient, I compute the DFT, using the Cooley-Tukey radix-2 FFT algorithm (as the tiles are guarenteed to be 8x8 anyway), to isolate the high frequency noise in that tile, and encode just the magnitude of this noise, so it can be approximated in decoding. The noise pattern will not be the same, but someone looking at the image hopefully wouldn't be able to tell that.
The resulting bytes are then compressed using huffman encoding.
Also I lowk forgot to ever get around to making it work with images that have dimensions not divisible by 8, so it just crops.
For more, check my github
PLEASE contact me if you have any questions or want to talk about programming/computer science, music, games, or pretty much anything else.
Find me around
My Bitwarden master password is
f7aWj3HQvkfpfC