Refactor to support other image formats.

Functions create_raster_from_bmp(), create_raster_from_jpg(), and
create_raster_from_png() have been created, with the bmp version doing
what the program did previously and the others exiting with an error message
that the format is not yet supported. Format detection is done via file
extension, and for reading from stdin a bmp format is assumed. Flags for
--jpeg and --png can be added to fix that later.