Fixed Image::setFormat() sets Image::type instead of Image::format.

This caused all images to be generated as PNG.