u/nablaCatin r/C_Programming • Recommends
Pixel Map Function Plotter
I've always wanted to get into graphics, but I wanted to start somewhere simple. I didn't want to immediately go balls-to-the-wall with a graphics specification or API, but just start with creating and editing images in C. So I found this video by Tsoding on making .ppm images. I only watched a few minutes in and got the basic idea for working with pixel maps.
I use a different magic number than the video. Tsoding uses "P6", but I use "P3" instead. I had a few hurdles to overcome before I could start making graphs, but I really loved the challenge.
For one, .ppm images are enormous. The files contain raw characters without any compression, so I have to convert…