#NEWLINE# def _get_layer_attributes( self ) : #NEWLINE# #INDENT# idx = self . limage . num_layers ( ) #NEWLINE# if ( self . limage . compose == 'rgb' ) : #NEWLINE# #INDENT# idx = min ( idx , 2 ) #NEWLINE# names = [ 'Red' , 'Green' , 'Blue' ] #NEWLINE# name = names [ idx ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# name = ( 'layer%d' % idx ) #NEWLINE# #UNINDENT# alpha = 1.0 #NEWLINE# bnch = Bunch . Bunch ( name = name , alpha = alpha , idx = idx ) #NEWLINE# return bnch