Open the temporary file again, it might be closed.
And set the suffix in the QImage::load() code so we can help QImage a bit finding the right format.