#NEWLINE# def get_image( source , exif_orientation = True , **options ) : #NEWLINE# #INDENT# '\n    Try to open the source file directly using PIL, ignoring any errors.\n\n    exif_orientation\n\n        If EXIF orientation data is present, perform any required reorientation\n        before passing the data along the processing pipeline.\n\n    ' #NEWLINE# source = StringIO ( source . read ( ) ) #NEWLINE# image = Image . open ( source ) #NEWLINE# image . load ( ) #NEWLINE# if exif_orientation : #NEWLINE# #INDENT# image = _exif_orientation ( image ) #NEWLINE# #UNINDENT# return image