def image_to_scratch(im, scratch_image_name):
 im.save(scratch_image_name, dpi=(200, 200))

def image_to_scratch ( im , scratch_image_name ) : im . save ( scratch_image_name , dpi = ( 200 , 200 ) )
saves image in memory to scratch file .