#NEWLINE# def _set_image( self , image ) : #NEWLINE# #INDENT# '\n        Set the image for this file.\n\n        This also caches the dimensions of the image.\n        ' #NEWLINE# if image : #NEWLINE# #INDENT# self . _image_cache = image #NEWLINE# self . _dimensions_cache = image . size #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if hasattr ( self , '_image_cache' ) : #NEWLINE# #INDENT# del self . _cached_image #NEWLINE# #UNINDENT# if hasattr ( self , '_dimensions_cache' ) : #NEWLINE# #INDENT# del image . _dimensions_cache