Refs #3, adds JPEG support.