#NEWLINE# def resize( self , width , height ) : #NEWLINE# #INDENT# if ( self . image . mode == 'P' ) : #NEWLINE# #INDENT# logger . debug ( 'converting image from 8-bit palette to 32-bit RGBA for resize' ) #NEWLINE# self . image = self . image . convert ( 'RGBA' ) #NEWLINE# #UNINDENT# self . image = self . image . resize ( ( int ( width ) , int ( height ) ) , Image . ANTIALIAS )