-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimage.py
More file actions
51 lines (48 loc) · 1.28 KB
/
Copy pathimage.py
File metadata and controls
51 lines (48 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/python3.6
# -*- coding: utf-8 -*-
from sys import argv
from imageCls import ImageFile
import imageSimplify
help ="""
modifier une image
utilisation
le script est appelable dans un fichier
python image.py fichier tag (fichierB)
les valeurs de tag
e imageRef: éffacer certaines couleurs de l'image principale. imageRef contient ces couleurs
s: simplifier les couleurs
"""
imageName = 'C:\\Users\\deborah.powers\\Desktop\\photo-deborah.bmp'
imageRefName = 'C:\\Users\\deborah.powers\\Desktop\\ref.bmp'
nbArg = len (argv)
if nbArg <2: print (help)
elif argv[1] == 'help':
from funcHelp import printHelp
printHelp (imageName)
elif argv[1] in 'es':
image = ImageFile (imageName)
image.open()
image.title = image.title +" bis"
if argv[1] == 'e':
imageRef = ImageFile (imageRefName)
imageRef.open()
image.eraseColors (imageRef)
elif argv[1] == 's': image.simplifyColors()
image.draw()
else: print (help)
"""
if nbArg <3: print (help)
elif argv[2] == 'help':
from funcHelp import printHelp
printHelp (argv[1])
elif argv[2] in 'es':
image = ImageFile (argv[1])
image.open()
image.title = image.title +" bis"
if argv[2] == 'e' and nbArg >3:
imageRef = ImageFile (argv[3])
imageRef.open()
image.eraseColors (imageRef)
elif argv[2] == 's': image.simplifyColors()
image.draw()
"""