コード例 #1
0
ファイル: DCS_processor.py プロジェクト: sbobovyc/DCS
def DCS_processor(source_image_path, num_colors, output_width, output_height):

    
    print source_image_path          
    self.analyze_image()
    self.thumb = DCS_utils.source_image_thumbnail(self.source_image_path)
    self.parent_gui.canvas2.create_image(64,64,image=self.thumb)
	output_width = 600
	output_height = 600
	
	self.current_image = Image.new ( "RGB", (output_width,output_height), self.base_color )
	draw = ImageDraw.Draw ( self.current_image )
	
	
	for x in range(0, 500):
	    blob = DCS_utils.Cammo_blob(self.colors[0],0,draw,width,height, max_level=2)
	    blob = DCS_utils.Cammo_blob(self.colors[1],0,draw,width,height, max_level=2)
	    blob = DCS_utils.Cammo_blob(self.colors[2],0,draw,width,height, max_level=2)
	self.imagetk = ImageTk.PhotoImage(self.current_image)
	self.parent_gui.canvas.create_image(0,0,image=self.imagetk)
	self.parent_gui.canvas.config(scrollregion=self.parent_gui.canvas.bbox(Tkinter.ALL))
コード例 #2
0
ファイル: DCS_gui_events.py プロジェクト: sbobovyc/DCS
 def file_open(self):
     self.source_image_path = askopenfilename() 
     print self.source_image_path          
     self.analyze_image()
     self.thumb = DCS_utils.source_image_thumbnail(self.source_image_path)
     self.parent_gui.canvas2.create_image(64, 64, image=self.thumb)
コード例 #3
0
 def file_open(self):
     self.source_image_path = askopenfilename()
     print self.source_image_path
     self.analyze_image()
     self.thumb = DCS_utils.source_image_thumbnail(self.source_image_path)
     self.parent_gui.canvas2.create_image(64, 64, image=self.thumb)