The main idea is to learn how to manipulate image with C.
Topic covered
- my personal experience about problem solving and IRC channel on libera really helped me when I struggle :)
- pointer stuff (dereferencing, arithmatic)
- flat array manipulation
- find a possibilities of color combination by applying the concept of permutation using bitmask!
- general control flow
- stb_image library
The code
Sample
The original image:
Screenshot of generated images (256*6 = 1536 in total):
The sephia version:
Lesson learned
Our eyes can see a bunch of colors, but it is merely a combination of three primary colors that trick our senses. This illustrates a simple pattern that can generate a million possible combinations, and can you imagine how wonderful it is?