aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Compiler.hs
diff options
context:
space:
mode:
authorpacien2020-01-23 23:16:07 +0100
committerNotkea2020-01-26 22:06:24 +0100
commitcf91102432b1196b8f3c1fa388b3963948ad49a6 (patch)
treeeb7bfdcaca87f6233f15887cadcf92586fdec7fc /compiler/src/Compiler.hs
parent987eb81cb5d98262299c7917d752c54907cbbc33 (diff)
downloadldgallery-cf91102432b1196b8f3c1fa388b3963948ad49a6.tar.gz
compiler: add jpeg export quality setting
GitHub: closes #2
Diffstat (limited to 'compiler/src/Compiler.hs')
-rw-r--r--compiler/src/Compiler.hs16
1 files changed, 10 insertions, 6 deletions
diff --git a/compiler/src/Compiler.hs b/compiler/src/Compiler.hs
index 13e9232..aca96bc 100644
--- a/compiler/src/Compiler.hs
+++ b/compiler/src/Compiler.hs
@@ -114,8 +114,8 @@ compileGallery inputDirPath outputDirPath rebuildAll =
114 inputTree <- readInputTree sourceTree 114 inputTree <- readInputTree sourceTree
115 115
116 let cache = if rebuildAll then skipCached else withCached 116 let cache = if rebuildAll then skipCached else withCached
117 let itemProc = itemProcessor (pictureMaxResolution config) cache 117 let itemProc = itemProcessor config cache
118 let thumbnailProc = thumbnailProcessor (thumbnailMaxResolution config) cache 118 let thumbnailProc = thumbnailProcessor config cache
119 let galleryBuilder = buildGalleryTree itemProc thumbnailProc (tagsFromDirectories config) 119 let galleryBuilder = buildGalleryTree itemProc thumbnailProc (tagsFromDirectories config)
120 resources <- galleryBuilder (galleryName config) inputTree 120 resources <- galleryBuilder (galleryName config) inputTree
121 121
@@ -128,7 +128,11 @@ compileGallery inputDirPath outputDirPath rebuildAll =
128 outputIndex = outputDirPath </> indexFile 128 outputIndex = outputDirPath </> indexFile
129 outputViewerConf = outputDirPath </> viewerConfFile 129 outputViewerConf = outputDirPath </> viewerConfFile
130 130
131 itemProcessor maxRes cache = 131 itemProcessor config cache =
132 itemFileProcessor maxRes cache inputDirPath outputDirPath itemsDir 132 itemFileProcessor
133 thumbnailProcessor thumbRes cache = 133 (pictureMaxResolution config) (jpegExportQuality config) cache
134 thumbnailFileProcessor thumbRes cache inputDirPath outputDirPath thumbnailsDir 134 inputDirPath outputDirPath itemsDir
135 thumbnailProcessor config cache =
136 thumbnailFileProcessor
137 (thumbnailMaxResolution config) (jpegExportQuality config) cache
138 inputDirPath outputDirPath thumbnailsDir