Code:
from calibre.ptempfile import TemporaryDirectory
with TemporaryDirectory('xxx') as tdir:
for x in ('one.jpg', 'two.jpg'):
with open(os.path.join(tdir, x) as f:
f.write(get_resources('images/' + x))
about.exec_()
It is important to note that you should exec your dialog inside the outermost with block as the temp dir will be deleted when you exit the with block.