Bchau branch

What if the image is a JPEG file? Can we omit the format parameter, or maybe only save it as format PNG if the `inImage.format is None`?