#NEWLINE# def _get_mode( number_of_channels ) : #NEWLINE# #INDENT# mode = None #NEWLINE# if ( number_of_channels == 3 ) : #NEWLINE# #INDENT# mode = RGB #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( number_of_channels == 4 ) : #NEWLINE# #INDENT# mode = RGBA #NEWLINE# #UNINDENT# #UNINDENT# return mode