Przeglądaj źródła

Added elevation on overlay and changed JPG to PNG

I've added elevation on text overlay, changed all images from JPG to PNG in order to preserve whole resolution and added code to remove map image for overlay.
tags/v.1.4
mihajlo2003petkovic 4 lat temu
committed by GitHub
rodzic
commit
123bd1b920
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 4 usunięć
  1. +6
    -4
      receive.sh

+ 6
- 4
receive.sh Wyświetl plik

@@ -42,18 +42,20 @@ log "Bulding pass map" "INFO"
/usr/local/bin/wxmap -T "${1}" -H "${4}" -p 0 -l 0 -o "${PASS_START}" "${NOAA_HOME}/map/${3}-map.png"
for i in $ENHANCEMENTS; do
log "Decoding image" "INFO"
/usr/local/bin/wxtoimg -o -m "${NOAA_HOME}/map/${3}-map.png" -e "$i" "${RAMFS_AUDIO}/audio/${3}.wav" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-$i.jpg"
/usr/bin/convert -quality 90 -format jpg "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-$i.jpg" -undercolor black -fill yellow -pointsize 18 -annotate +20+20 "${1} $i ${START_DATE}" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-$i.jpg"
/usr/local/bin/wxtoimg -o -m "${NOAA_HOME}/map/${3}-map.png" -e "$i" "${RAMFS_AUDIO}/audio/${3}.wav" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-$i.png"
/usr/bin/convert "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-$i.png" -undercolor black -fill yellow -pointsize 18 -annotate +20+20 "${1} $i ${START_DATE} Elevation: $7°" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/${3}-$i.png"
done
if [ -n "$CONSUMER_KEY" ]; then
log "Posting to Twitter" "INFO"
if [ "${SUN_ELEV}" -gt "${SUN_MIN_ELEV}" ]; then
python3 "${NOAA_HOME}/post.py" "$1 ${START_DATE}" "$7" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/$3-MCIR-precip.jpg" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/$3-MSA-precip.jpg" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/$3-HVC-precip.jpg" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/$3-HVCT-precip.jpg"
python3 "${NOAA_HOME}/post.py" "$1 ${START_DATE}" "$7" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/$3-MCIR-precip.png" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/$3-MSA-precip.png" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/$3-HVC-precip.png" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/$3-HVCT-precip.png"
else
python3 "${NOAA_HOME}/post.py" "$1 ${START_DATE}" "$7" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/$3-MCIR-precip.jpg" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/$3-MCIR.jpg"
python3 "${NOAA_HOME}/post.py" "$1 ${START_DATE}" "$7" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/$3-MCIR-precip.png" "${NOAA_OUTPUT}/image/${FOLDER_DATE}/$3-MCIR.png"
fi
fi

rm "${NOAA_HOME}/map/${3}-map.png"

if [ "$DELETE_AUDIO" = true ]; then
log "Deleting audio files" "INFO"
rm "${RAMFS_AUDIO}/audio/${3}.wav"


Ładowanie…
Anuluj
Zapisz