Practice C with Puzzling Pictures

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 quickly and easily write programs that do interesting things with images and not worry about the complexity of other formats.

Although you will learn something of image procssing in working through these puzzles, the primary goal is to reenforce 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

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