Initial attempt to add JPEG support.