forked from opencaching/opencaching-pl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stage 1: graphics resources Reference: opencaching#860 - removed stale and unused files (22x22*, 24x24*, usb*, mystery*) - added graphics for new cache types (benchmark, bitcache, challenge, guestbook) - created icon resources /public/images/cache/res - created icon build script - moved KML build resources and script to /public/images/cache/res (/public/images/cache/kml now contains only production images) - updated KML icons build script From now on it is easy to generate the entire iconset from res/ directory. Just enable each cache type icon in res/__cache_types.txt. Also, KML icons will be generated from the same set.
- Loading branch information
Showing
191 changed files
with
202 additions
and
34 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Diff not rendered.
Diff not rendered.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# cache types | ||
# | ||
# Format: cache_type_definition (according to GeoCacheCommons) {space} icon name | ||
# Lines starting with # are comments | ||
# Empty lines are ignored | ||
|
||
# All files 32x32 PNG or SVG images | ||
|
||
TYPE_OTHERTYPE unknown | ||
TYPE_TRADITIONAL traditional | ||
TYPE_MULTICACHE multi | ||
TYPE_VIRTUAL virtual | ||
TYPE_WEBCAM webcam | ||
TYPE_EVENT event | ||
TYPE_QUIZ quiz | ||
TYPE_MOVING moving | ||
#TYPE_GEOPATHFINAL podcache ###TODO: old -podcast- type? | ||
TYPE_OWNCACHE owncache | ||
|
||
TYPE_GUESTBOOK guestbook | ||
TYPE_BITCACHE bitcache | ||
TYPE_BENCHMARK benchmark | ||
TYPE_CHALLENGE challenge |
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
#!/bin/bash | ||
|
||
# Compose standard cache icons (in res directory) | ||
# to required opencaching-pl iconset | ||
|
||
|
||
SRC="." | ||
DST=".." | ||
PWD_CHECK="res" | ||
SKIP_EXISTING=1 | ||
|
||
CACHE_TYPES=$(cat __cache_types.txt | grep -vE "^#|^\s*$" | cut -f2 -d' ') | ||
|
||
_FILENAME() { | ||
INPUT="$1" | ||
OUTPUT=$(echo ${INPUT}.* | grep -iE "png|svg" | sort -r | head -n 1) | ||
echo "${OUTPUT}" | ||
} | ||
|
||
_OVERLAY_A="-a" | ||
_OVERLAY_D="-d" | ||
_OVERLAY_DNF="-dnf" | ||
_OVERLAY_FOUND="-found" | ||
_OVERLAY_I="-i" | ||
_OVERLAY_N="-n" | ||
_OVERLAY_S="-s" | ||
_OVERLAY_OWNER="-owner" | ||
|
||
OVERLAY_A=$(_FILENAME "_overlay__${_OVERLAY_A}") | ||
OVERLAY_D=$(_FILENAME "_overlay__${_OVERLAY_D}") | ||
OVERLAY_DNF=$(_FILENAME "_overlay__${_OVERLAY_DNF}") | ||
OVERLAY_FOUND=$(_FILENAME "_overlay__${_OVERLAY_FOUND}") | ||
OVERLAY_I=$(_FILENAME "_overlay__${_OVERLAY_I}") | ||
OVERLAY_N=$(_FILENAME "_overlay__${_OVERLAY_N}") | ||
OVERLAY_OWNER=$(_FILENAME "_overlay__${_OVERLAY_OWNER}") | ||
|
||
usage() { | ||
cat << EOM | ||
usage: make-cache-iconset.sh [options] | ||
OPTIONS: | ||
-o overwrite existing icons (default skip) | ||
-h show this message | ||
EOM | ||
} | ||
|
||
if [ "$(basename $(pwd))" != "${PWD_CHECK}" ]; then | ||
echo "Error: must be called inside '${PWD_CHECK}' directory. Stop." | ||
echo | ||
exit 1 | ||
fi | ||
|
||
while getopts "oh" OPTS; do | ||
case $OPTS in | ||
o) | ||
SKIP_EXISTING= | ||
;; | ||
h) | ||
usage | ||
exit 1 | ||
;; | ||
\?) | ||
echo "use $0 -h for help" | ||
exit | ||
;; | ||
esac | ||
done | ||
|
||
# Compose icons | ||
function composeICONS() { | ||
NAME="$1" | ||
CACHE=$(_FILENAME "_cache_type__$1") | ||
|
||
if [ ! -f "${SRC}/${CACHE}" ]; then | ||
echo "Error: file not found ${CACHE}!" | ||
exit 1 | ||
fi | ||
rm -f "${DST}/${NAME}*" | ||
|
||
convert "${SRC}/${CACHE}" png32:"${DST}/${NAME}.png" | ||
|
||
convert "${SRC}/${CACHE}" -resize 16x16 png32:"${DST}/16x16-${NAME}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_FOUND}" -compose src-over -composite -resize 16x16 png32:"${DST}/16x16-${NAME}${_OVERLAY_FOUND}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_OWNER}" -compose src-over -composite -resize 16x16 png32:"${DST}/16x16-${NAME}${_OVERLAY_S}${_OVERLAY_OWNER}.png" | ||
|
||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_A}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_A}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_A}" -compose src-over -composite "${OVERLAY_DNF}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_A}${_OVERLAY_DNF}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_A}" -compose src-over -composite "${OVERLAY_FOUND}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_A}${_OVERLAY_FOUND}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_A}" -compose src-over -composite "${OVERLAY_OWNER}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_A}${_OVERLAY_OWNER}.png" | ||
|
||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_D}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_D}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_D}" -compose src-over -composite "${OVERLAY_DNF}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_D}${_OVERLAY_DNF}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_D}" -compose src-over -composite "${OVERLAY_FOUND}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_D}${_OVERLAY_FOUND}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_D}" -compose src-over -composite "${OVERLAY_OWNER}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_D}${_OVERLAY_OWNER}.png" | ||
|
||
convert -size 34x34 xc:none -alpha set -background none "${SRC}/${CACHE}" -geometry +1+1 -compose dst-over -composite "${OVERLAY_I}" -compose dst-over -composite png32:"${DST}/${NAME}${_OVERLAY_I}.png" | ||
convert -size 34x34 xc:none -alpha set -background none "${SRC}/${CACHE}" -geometry +1+1 -compose dst-over -composite "${OVERLAY_I}" -compose dst-over -composite -fx '(r+g+b)/3' png32:"${DST}/${NAME}${_OVERLAY_I}-bw.png" | ||
|
||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_N}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_N}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_N}" -compose src-over -composite "${OVERLAY_DNF}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_N}${_OVERLAY_DNF}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_N}" -compose src-over -composite "${OVERLAY_FOUND}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_N}${_OVERLAY_FOUND}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_N}" -compose src-over -composite "${OVERLAY_OWNER}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_N}${_OVERLAY_OWNER}.png" | ||
|
||
convert -alpha set -background none "${SRC}/${CACHE}" png32:"${DST}/${NAME}${_OVERLAY_S}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_DNF}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_S}${_OVERLAY_DNF}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_FOUND}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_S}${_OVERLAY_FOUND}.png" | ||
convert -alpha set -background none "${SRC}/${CACHE}" -channel a -evaluate multiply 0.6 +channel "${OVERLAY_OWNER}" -compose src-over -composite png32:"${DST}/${NAME}${_OVERLAY_S}${_OVERLAY_OWNER}.png" | ||
} | ||
|
||
# Process all cache types | ||
for x in ${CACHE_TYPES}; do | ||
if [ -f "${DST}/${x}.png" -a "${SKIP_EXISTING}" == "1" ]; then | ||
echo "Skipping ${x} (already exists)" | ||
continue | ||
fi | ||
echo -n "Creating iconset for ${x}..." | ||
composeICONS "${x}" | ||
echo "done." | ||
done | ||
|
||
|
||
if [ -f "${DST}/preview.png" ]; then | ||
rm -f "${DST}/preview.png" | ||
fi | ||
echo "Creating preview ..." | ||
montage "${DST}/*.png" -geometry 32x32+2+2 -tile 16x png24:${DST}/preview.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
# Convert standard cache icons (in parent directory) for better display | ||
# in Google Earth via KML export | ||
|
||
SRC="." | ||
DST="../kml" | ||
PWD_CHECK="res" | ||
CACHE_TYPES=$(cat "__cache_types.txt" | grep -vE "^#|^\s*$" | cut -f2 -d' ') | ||
|
||
MARKER="__kml_oc.png" | ||
MARKER_DISABLED="__kml_disabled_oc.png" | ||
MARKER_ARCHIVED="__kml_archived_oc.png" | ||
|
||
if [ "$(basename $(pwd))" != "${PWD_CHECK}" ]; then | ||
echo "Error: must be called inside '${PWD_CHECK}' directory. Stop." | ||
echo | ||
exit 1 | ||
fi | ||
|
||
function _FILENAME() { | ||
INPUT="$1" | ||
OUTPUT=$(echo ${INPUT}.* | grep -iE "png|svg" | sort -r | head -n 1) | ||
echo "${OUTPUT}" | ||
} | ||
|
||
function convertKML() { | ||
NAME="$1" | ||
CACHE=$(_FILENAME "_cache_type__$1") | ||
KML="$1_kml.png" | ||
KML_DISABLED="$1_kml-disabled.png" | ||
KML_ARCHIVED="$1_kml-archived.png" | ||
|
||
if [ ! -f "${CACHE}" ]; then | ||
echo "Error: file not found ${CACHE}!" | ||
exit 1 | ||
fi | ||
|
||
rm -f "${DST}/${KML}" | ||
rm -f "${DST}/${KML_DISABLED}" | ||
rm -f "${DST}/${KML_ARCHIVED}" | ||
|
||
composite -compose src-over -geometry +6+6 "${CACHE}" "${MARKER}" png32:"${DST}/${KML}" | ||
composite -compose src-over -geometry +6+6 "${CACHE}" "${MARKER_DISABLED}" png32:"${DST}/${KML_DISABLED}" | ||
composite -compose src-over -geometry +6+6 "${CACHE}" "${MARKER_ARCHIVED}" png32:"${DST}/${KML_ARCHIVED}" | ||
} | ||
|
||
for x in ${CACHE_TYPES}; do | ||
echo -n "Creating KML icon for ${x}..." | ||
convertKML $x | ||
echo "done." | ||
done |
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.