Using TIFF library to read/write images on Linux - instruction and sample programs:
  1. Download TIFF library from http://www.libtiff.org and build on your system.
  2. Download jpeg2tiff.c, tiff2jpeg.c, testimg.tif and follow the instruction in jpeg2jpeg.c to compile and run the program.