#NEWLINE# def _get_colors( self , f ) : #NEWLINE# #INDENT# '\n        Misterious function, ask @inconvergent :)\n        ' #NEWLINE# scale = ( 1.0 / 255.0 ) #NEWLINE# im = Image . open ( f ) #NEWLINE# ( w , h ) = im . size #NEWLINE# rgbim = im . convert ( 'RGB' ) #NEWLINE# res = [ ] #NEWLINE# for i in xrange ( 0 , w ) : #NEWLINE# #INDENT# for j in xrange ( 0 , h ) : #NEWLINE# #INDENT# ( r , g , b ) = rgbim . getpixel ( ( i , j ) ) #NEWLINE# res . append ( ( ( r * scale ) , ( g * scale ) , ( b * scale ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# np . shuffle ( f ) #NEWLINE# self . colors = res #NEWLINE# self . n_colors = len ( res )