def _get_corrected_exif(image, original):
 if ('exif' in original.info):
  image_exif = image.info.get('exif', piexif.dump({}))
  original_exif = original.info['exif']
  image_exif = _update_exif_orientation(image_exif, _get_exif_orientation(original_exif))
  return image_exif

def _get_corrected_exif ( image , original ) : if ( 'exif' in original . info ) : image_exif = image . info . get ( 'exif' , piexif . dump ( { } ) ) original_exif = original . info [ 'exif' ] image_exif = _update_exif_orientation ( image_exif , _get_exif_orientation ( original_exif ) ) return image_exif
if the original image contains exif data .