multithreaded image saving