-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·36 lines (33 loc) · 797 Bytes
/
Copy pathmain.py
File metadata and controls
executable file
·36 lines (33 loc) · 797 Bytes
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
import argparse
from imageworker.worker import Worker
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
'-s',
help='Source image directory',
required=True,
type=str,
)
parser.add_argument(
'-d',
help='Destination image directory',
required=True,
type=str
)
parser.add_argument(
'-q',
help='Image quality (0 to 100)',
required=False,
type=int,
default=100
)
parser.add_argument(
'-si',
help='List of sizes',
required=False,
nargs='+',
type=int,
default=[1280, 960, 760, 640, 480, 320, 240]
)
args = parser.parse_args()
Worker(args.s, args.d, args.q, args.si).main()