Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Quack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
commul
Zeit.shift
Quack
Commits
43d71fd6
Commit
43d71fd6
authored
11 years ago
by
Toke Eskildsen
Browse files
Options
Downloads
Patches
Plain Diff
Added generation of blown high- and low-lights overlays for thumbs
parent
c61dcebf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
quack.sh
+23
-0
23 additions, 0 deletions
quack.sh
with
23 additions
and
0 deletions
quack.sh
+
23
−
0
View file @
43d71fd6
...
@@ -83,7 +83,10 @@ export FORCE_QAIMAGE=false
...
@@ -83,7 +83,10 @@ export FORCE_QAIMAGE=false
# If true, thumbnails will be generated even if they already exists.
# If true, thumbnails will be generated even if they already exists.
export
FORCE_THUMBNAILS
=
false
export
FORCE_THUMBNAILS
=
false
# If true, blown high- and low-light overlays will be generated even if they already exists.
# If true, blown high- and low-light overlays will be generated even if they already exists.
# Setting this to true will also set FORCE_BLOWN_THUMBS to true
export
FORCE_BLOWN
=
false
export
FORCE_BLOWN
=
false
# If true, blown high- and low-light overlays for thumbs will be generated even if they already exists.
export
FORCE_BLOWN_THUMBS
=
false
# If true, presentation images will be generated even if they already exists.
# If true, presentation images will be generated even if they already exists.
export
FORCE_PRESENTATION
=
false
export
FORCE_PRESENTATION
=
false
# If true, histogram images will be generated even if they already exists.
# If true, histogram images will be generated even if they already exists.
...
@@ -123,6 +126,11 @@ if [ -e "quack.settings" ]; then
...
@@ -123,6 +126,11 @@ if [ -e "quack.settings" ]; then
fi
fi
popd
>
/dev/null
popd
>
/dev/null
if
[
".true"
==
".
$FORCE_BLOWN
"
]
;
then
# When we force regeneration of blown, we myst also regenerate the blown thumbs.
export
FORCE_BLOWN_THUMBS
=
true
fi
PRESENTATION_SCRIPT
=
"
$ROOT
/presentation.sh"
PRESENTATION_SCRIPT
=
"
$ROOT
/presentation.sh"
FOLDER_TEMPLATE
=
"
$ROOT
/folder_template.html"
FOLDER_TEMPLATE
=
"
$ROOT
/folder_template.html"
IMAGE_TEMPLATE
=
"
$ROOT
/image_template.html"
IMAGE_TEMPLATE
=
"
$ROOT
/image_template.html"
...
@@ -259,6 +267,8 @@ function makeImages() {
...
@@ -259,6 +267,8 @@ function makeImages() {
local
THUMB_IMAGE
=
"
${
DEST_FOLDER
}
/
${
BASE
}
.thumb.jpg"
local
THUMB_IMAGE
=
"
${
DEST_FOLDER
}
/
${
BASE
}
.thumb.jpg"
local
WHITE_IMAGE
=
"
${
DEST_FOLDER
}
/
${
BASE
}
.white.png"
local
WHITE_IMAGE
=
"
${
DEST_FOLDER
}
/
${
BASE
}
.white.png"
local
BLACK_IMAGE
=
"
${
DEST_FOLDER
}
/
${
BASE
}
.black.png"
local
BLACK_IMAGE
=
"
${
DEST_FOLDER
}
/
${
BASE
}
.black.png"
local
THUMB_OVERLAY_WHITE
=
"
${
DEST_FOLDER
}
/
${
BASE
}
.white.thumb.png"
local
THUMB_OVERLAY_BLACK
=
"
${
DEST_FOLDER
}
/
${
BASE
}
.black.thumb.png"
local
PRESENTATION_IMAGE
=
"
${
DEST_FOLDER
}
/
${
BASE
}
.presentation.jpg"
local
PRESENTATION_IMAGE
=
"
${
DEST_FOLDER
}
/
${
BASE
}
.presentation.jpg"
local
TILE_FOLDER
=
"
${
DEST_FOLDER
}
/
${
BASE
}
_files"
local
TILE_FOLDER
=
"
${
DEST_FOLDER
}
/
${
BASE
}
_files"
...
@@ -311,6 +321,19 @@ function makeImages() {
...
@@ -311,6 +321,19 @@ function makeImages() {
gm convert
"
$CONV
"
-sharpen
3
-enhance
-resize
$THUMB_IMAGE_SIZE
"
$THUMB_IMAGE
"
gm convert
"
$CONV
"
-sharpen
3
-enhance
-resize
$THUMB_IMAGE_SIZE
"
$THUMB_IMAGE
"
fi
fi
if
shouldGenerate
"
$FORCE_BLOWN_THUMBS
"
"
$THUMB_OVERLAY_WHITE
"
"thumb overlay"
;
then
echo
" -
${
THUMB_OVERLAY_WHITE
##*/
}
"
# Note: We use ImageMagick here as older versions of GraphicsMagic does not
# handle resizing of alpha-channel PNGs followed by color reduction
convert
"
$WHITE_IMAGE
"
-resize
$THUMB_IMAGE_SIZE
-colors
2
"
$THUMB_OVERLAY_WHITE
"
fi
if
shouldGenerate
"
$FORCE_BLOWN_THUMBS
"
"
$THUMB_OVERLAY_BLACK
"
"thumb overlay"
;
then
echo
" -
${
THUMB_OVERLAY_BLACK
##*/
}
"
# Note: We use ImageMagick here as older versions of GraphicsMagic does not
# handle resizing of alpha-channel PNGs followed by color reduction
convert
"
$BLACK_IMAGE
"
-resize
$THUMB_IMAGE_SIZE
-colors
2
"
$THUMB_OVERLAY_BLACK
"
fi
}
}
# Generates overlays for the stated block and updates idnext & idprev
# Generates overlays for the stated block and updates idnext & idprev
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment