#NEWLINE# def get_image_size( self , fileid ) : #NEWLINE# #INDENT# 'Return the image dimensions\n        In:\n            - ``fileid`` -- file identifier\n        Return:\n            - a tuple representing the image dimensions (width, height) or (None, None) in case of error\n        ' #NEWLINE# dim = ( None , None ) #NEWLINE# try : #NEWLINE# #INDENT# dim = Image . open ( self . _get_filename ( dim ) ) . size #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# log . error ( 'Could not get image dimensions of %r' , fileid , exc_info = True ) #NEWLINE# #UNINDENT# return dim