#NEWLINE# @ Image . operation #NEWLINE# def resize( self , size ) : #NEWLINE# #INDENT# if ( self . image . mode in [ '1' , 'P' ] ) : #NEWLINE# #INDENT# if self . has_alpha ( ) : #NEWLINE# #INDENT# image = self . image . convert ( 'RGBA' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# image = self . image . convert ( 'RGB' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# image = self . image #NEWLINE# #UNINDENT# return PillowImage ( image . resize ( size , _PIL_Image ( ) . ANTIALIAS ) )