Each of the following thumbnail images is a link to a larger 512×512 PGM or PPM image, except for the rightmost ones which are 256×512. Click on a thumbnail to download the image. The details of how to download depends on your browser.
Testing with the non-square rightmost image will help you verify that you have not mixed up the row and column indices in your program.
If you have a large enough screen to display a 512×1024 image, you may want to try out the following as well. [Image from Stockvault used with permission]
None of the images above have comments in their header sections. The following one does. If you apply the program in image-io-test-0.c of Listing 14.10 (page 130) to it, the output file won't be identical to the input file since our read_image() discards header comments. The images, however, would be identical.
$ image-io-test
should be
$ ./image-io-test
. The last line
on page 129 should be corrected in the same way.
read_pgm_image()
should be
read_image()
.
Programming Projects in C |