Skip to content
Snippets Groups Projects
Commit c5f09404 authored by Toke Eskildsen's avatar Toke Eskildsen
Browse files

Extended comments for configuration, fixed hidden extension problem for blown...

Extended comments for configuration, fixed hidden extension problem for blown high- and low-light overlays
parent b88551ce
No related branches found
No related tags found
No related merge requests found
...@@ -44,9 +44,15 @@ ...@@ -44,9 +44,15 @@
# Settings below. Instead of changing this file, it is recommended to # Settings below. Instead of changing this file, it is recommended to
# create a new file "quack.settings" with the wanted setup as it will # create a new file "quack.settings" with the wanted setup as it will
# override the defaults below. # override the defaults below.
# The types of images to pull from source
IMAGE_GLOB="*.tiff *.tif *.jp2 *.jpeg2000 *.j2k *.jpg *.jpeg" IMAGE_GLOB="*.tiff *.tif *.jp2 *.jpeg2000 *.j2k *.jpg *.jpeg"
# The extension of the ALTO files corresponding to the image files
# ALTO files are expected to be located next to the image files:
# OurScanProject_batch_2013-09-18_page_007.tif
# OurScanProject_batch_2013-09-18_page_007.alto.xml
ALTO_EXT=".alto.xml" ALTO_EXT=".alto.xml"
export IMAGE_DISP_EXT=".png" export IMAGE_DISP_EXT="png"
export THUMB_IMAGE_SIZE="300x200" export THUMB_IMAGE_SIZE="300x200"
# These elements will be grepped from the ALTO-files and shown on the image pages # These elements will be grepped from the ALTO-files and shown on the image pages
ALTO_ELEMENTS="processingDateTime softwareName" ALTO_ELEMENTS="processingDateTime softwareName"
...@@ -152,11 +158,11 @@ function makeImageParams() { ...@@ -152,11 +158,11 @@ function makeImageParams() {
# Used by function caller # Used by function caller
# Must be mirrored in makeImages # Must be mirrored in makeImages
SOURCE_IMAGE="${SRC_FOLDER}/${IMAGE}" SOURCE_IMAGE="${SRC_FOLDER}/${IMAGE}"
DEST_IMAGE="${DEST_FOLDER}/${BASE}${IMAGE_DISP_EXT}" DEST_IMAGE="${DEST_FOLDER}/${BASE}.${IMAGE_DISP_EXT}"
HIST_IMAGE="${DEST_FOLDER}/${BASE}.histogram${IMAGE_DISP_EXT}" HIST_IMAGE="${DEST_FOLDER}/${BASE}.histogram.png"
THUMB_IMAGE="${DEST_FOLDER}/${BASE}.thumb.jpg" THUMB_IMAGE="${DEST_FOLDER}/${BASE}.thumb.jpg"
WHITE_IMAGE="${DEST_FOLDER}/${BASE}.white${IMAGE_DISP_EXT}" WHITE_IMAGE="${DEST_FOLDER}/${BASE}.white.png"
BLACK_IMAGE="${DEST_FOLDER}/${BASE}.black${IMAGE_DISP_EXT}" BLACK_IMAGE="${DEST_FOLDER}/${BASE}.black.png"
PRESENTATION_IMAGE="${DEST_FOLDER}/${BASE}.presentation.jpg" PRESENTATION_IMAGE="${DEST_FOLDER}/${BASE}.presentation.jpg"
} }
...@@ -178,11 +184,11 @@ function makeImages() { ...@@ -178,11 +184,11 @@ function makeImages() {
# Do not cheat by calling makeImageParams as makeImages might # Do not cheat by calling makeImageParams as makeImages might
# be called in parallel # be called in parallel
local SOURCE_IMAGE="${SRC_FOLDER}/${IMAGE}" local SOURCE_IMAGE="${SRC_FOLDER}/${IMAGE}"
local DEST_IMAGE="${DEST_FOLDER}/${BASE}${IMAGE_DISP_EXT}" local DEST_IMAGE="${DEST_FOLDER}/${BASE}.${IMAGE_DISP_EXT}"
local HIST_IMAGE="${DEST_FOLDER}/${BASE}.histogram${IMAGE_DISP_EXT}" local HIST_IMAGE="${DEST_FOLDER}/${BASE}.histogram.png"
local THUMB_IMAGE="${DEST_FOLDER}/${BASE}.thumb.jpg" local THUMB_IMAGE="${DEST_FOLDER}/${BASE}.thumb.jpg"
local WHITE_IMAGE="${DEST_FOLDER}/${BASE}.white${IMAGE_DISP_EXT}" local WHITE_IMAGE="${DEST_FOLDER}/${BASE}.white.png"
local BLACK_IMAGE="${DEST_FOLDER}/${BASE}.black${IMAGE_DISP_EXT}" local BLACK_IMAGE="${DEST_FOLDER}/${BASE}.black.png"
local PRESENTATION_IMAGE="${DEST_FOLDER}/${BASE}.presentation.jpg" local PRESENTATION_IMAGE="${DEST_FOLDER}/${BASE}.presentation.jpg"
if [ ! -f $SOURCE_IMAGE ]; then if [ ! -f $SOURCE_IMAGE ]; then
...@@ -195,7 +201,7 @@ function makeImages() { ...@@ -195,7 +201,7 @@ function makeImages() {
gm convert "$SOURCE_IMAGE" "$DEST_IMAGE" gm convert "$SOURCE_IMAGE" "$DEST_IMAGE"
fi fi
if [ ".png" == ${IMAGE_DISP_EXT} ]; then if [ "png" == ${IMAGE_DISP_EXT} ]; then
# PNG is fairly fast to decode so use that as source # PNG is fairly fast to decode so use that as source
local CONV="$DEST_IMAGE" local CONV="$DEST_IMAGE"
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment