#NEWLINE# @ Image . converter_to ( RGBImageBuffer ) #NEWLINE# def to_buffer_rgb( self ) : #NEWLINE# #INDENT# image = image . image #NEWLINE# if ( image . mode != 'RGB' ) : #NEWLINE# #INDENT# image = image . convert ( 'RGB' ) #NEWLINE# #UNINDENT# return RGBImageBuffer ( image . size , image . tobytes ( ) )