コード例 #1
0
# -*- coding: utf-8 -*-
from PlaceHoldMachine import PlaceHoldMachine  #import class

i = PlaceHoldMachine()  #create class instance
i.log_level = 2  #set log level to 2, so we can see errors

# set directories list, where all images will be replaced with placeholders
dirs = [
    'C:/MyTemplate/images/demo', 'C:/MyTemplate/images/ads',
    'C:/MyTemplate/images/team'
]

i.disable_color_detection()  #disable primary color detection
i.set_primary_color((255, 0, 0))  #set background color to Red
i.set_contrast_color((0, 0, 0))  #set font color to Black

i.walk_recursive(dirs)  #recursively find all images in given directories
i.start()  #begin conversion process
コード例 #2
0
# -*- coding: utf-8 -*- 
from PlaceHoldMachine import PlaceHoldMachine #import class

i = PlaceHoldMachine() #create class instance
i.log_level = 2 #set log level to 2, so we can see errors

# set directories list, where all images will be replaced with placeholders
dirs = [
	'C:/MyTemplate/images/demo',
	'C:/MyTemplate/images/ads',
	'C:/MyTemplate/images/team'
]

i.disable_color_detection() #disable primary color detection
i.set_primary_color( (255, 0, 0) ) #set background color to Red
i.set_contrast_color( (0, 0, 0) ) #set font color to Black

i.walk_recursive(dirs) #recursively find all images in given directories
i.start() #begin conversion process
コード例 #3
0
ファイル: use.py プロジェクト: Priler/PlaceHoldMachine
# -*- coding: utf-8 -*- 
from PlaceHoldMachine import PlaceHoldMachine

i = PlaceHoldMachine()
i.log_level = 2

dirs = [
	'C:/MyTemplate/images'
]

i.walk_recursive(dirs)
i.start()
コード例 #4
0
# -*- coding: utf-8 -*-
from PlaceHoldMachine import PlaceHoldMachine

i = PlaceHoldMachine()
i.log_level = 2

dirs = ['C:/MyTemplate/images']

i.walk_recursive(dirs)
i.start()