Reworked argument parsing, filter application, added parsing config files.

This commit is contained in:
Rostislav Lán
2022-12-08 19:05:19 +01:00
parent 5bb870547d
commit ae58def273
2 changed files with 158 additions and 53 deletions

39
config/config.json Normal file
View File

@ -0,0 +1,39 @@
{
"default": {
"inputFile": "res/img.png",
"outputFile": "res/img_done.png",
"dpi": 500,
"flip": false,
"width": 0,
"filters": [
"gaussian",
"erode",
"blur"
]
},
"test1" : {
"inputFile" : "res/test_fp.png",
"outputFile" : "res/test_fp_cpy.png",
"dpi" : 500,
"flip" : true,
"width" : 0,
"filters": [
"gaussian" ,
"erode",
"blur"
]
},
"test2": {
"inputFile": "res/test_fp.png",
"outputFile": "res/test_fp_cpy.png",
"dpi": 1000,
"flip": false,
"width": 500,
"filters": [
"gaussian",
"dilate"
]
}
}