This repository was archived by the owner on Sep 19, 2024. It is now read-only.
forked from john-root/jp2iser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
38 lines (32 loc) · 1.77 KB
/
settings.py
File metadata and controls
38 lines (32 loc) · 1.77 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
KDU_COMPRESS = '/usr/local/bin/kakadu/kdu_compress'
KDU_EXPAND = '/usr/local/bin/kakadu/kdu_expand'
OUTPUT_DIR = '/home/ubuntu/out/'
TMP_DIR = '/home/ubuntu/jp2iser/tmp/'
KDU_LIB = '/usr/local/bin/kakadu'
MKFIFO = '/usr/bin/mkfifo'
IMAGE_MODES = {
"L": "-no_palette", # greyscale
"1": "-no_palette", # bitonal
"RGB": "-jp2_space sRGB" # RGB
}
# note the double escape of braces for formatting
CMD_COMPRESS = {
"kdu_low": '{kdu} -i {input} -o {output} Clevels=7 "Cblk={{64,64}}" "Cuse_sop=yes" {image_mode} ' +
'"ORGgen_plt=yes" "ORGtparts=R" "Corder=RPCL" -rate 0.5 ' +
'"Cprecincts={{256,256}},{{256,256}},{{256,256}},{{128,128}},' +
'{{128,128}},{{64,64}},{{64,64}},{{32,32}},{{16,16}}"',
"kdu_med": '{kdu} -i {input} -o {output} Clevels=7 "Cblk={{64,64}}" "Cuse_sop=yes" {image_mode} ' +
'"ORGgen_plt=yes" "ORGtparts=R" "Corder=RPCL" -rate 2 ' +
'"Cprecincts={{256,256}},{{256,256}},{{256,256}},{{128,128}},' +
'{{128,128}},{{64,64}},{{64,64}},{{32,32}},{{16,16}}"',
"kdu_high": '{kdu} -i {input} -o {output} Clevels=7 "Cblk={{64,64}}" "Cuse_sop=yes" {image_mode} ' +
'"ORGgen_plt=yes" "ORGtparts=R" "Corder=RPCL" -rate 4 ' +
'"Cprecincts={{256,256}},{{256,256}},{{256,256}},{{128,128}},' +
'{{128,128}},{{64,64}},{{64,64}},{{32,32}},{{16,16}}"',
"kdu_max": '{kdu} -i {input} -o {output} Clevels=7 "Cblk={{64,64}}" "Cuse_sop=yes" {image_mode} ' +
'"ORGgen_plt=yes" "ORGtparts=R" "Corder=RPCL" -rate - ' +
'"Cprecincts={{256,256}},{{256,256}},{{256,256}},{{128,128}},' +
'{{128,128}},{{64,64}},{{64,64}},{{32,32}},{{16,16}}"',
}
map_profile_to_srgb = True
srgb_profile_fp = '/usr/share/color/icc/colord/sRGB.icc'