improve saving an image
change the default number of threads