Temp file storage breaks license terms - particularly as there are undelete utilities.
Surfaces are not a solution here as a 4k x 4k RGBA takes up 67,108,864 bytes and GZ compression won't get that back to PNG sizes (only PNG will do that).
Guess a decode buffer to surface extension is required...