Practice C with Puzzling Images

What this is: These pages contain a collection of programming puzzles and solutions involving images. The goal of the puzzles is to give you interesting opportunities to practice programming in C. The puzzles use the PGM and PPM image formats. These are simple image formats, so you can easily write programs that do interesting things with images and not worry about the complexity of more common formats.

Although you will learn something of image processing in working through these puzzles, the primary goal is reinforce your C programming ability. Advanced image processing topics, like image transformations and filters are not discussed. But you will be able to create interesting images like the first two below, or do image enhancement like in the second two images.

For a discussion about how to use these puzzles, go to the Frequently Asked Questions: FAQ

Random Blocks Spiral
Random Blocks Color Spiral

Kernighan Girl
Original Image Enhanced Image

Table of Contents

Image viewers Introduction. A Useful Image Viewer.
Gray Level images Gray-level images. PGM image format.
Puzzles 01 - 10 Puzzles: Creating simple PGM images.
Gray Level Images in Memory PGM images created in main storage.
Puzzles 11 - 25 Puzzles: Creating images in main storage.
Puzzles 26 - 40 Puzzles: More images in main storage
Image Smoothing Smoothing images in memory.
Puzzles 41 - 50 Puzzles: Smoothing
Color Images Color images. PPM image format.
Puzzles 61 - 70 Puzzles: Creating color images.
Puzzles 71 - 80 Puzzles: More color images.
Color Images in Memory Color images in main storage.
Puzzles 81 - 90 Puzzles: creating color images in main storage.
Puzzles 91 - 100 Puzzles: modifying color images