t* Simple Justified Gallery
       
   URI git clone git://git.codevoid.de/mkpicindex
   DIR Log
   DIR Files
   DIR Refs
   DIR README
       ---
   DIR commit d765880de0c9942070f36aa2a4055e33ae86fcdd
   DIR parent c5f1209d1eae2d3c33df51b69bdd76e6330f9186
   URI Author: Stefan Hagen <sh+git[at]codevoid[dot]de>
       Date:   Sun, 27 Oct 2019 21:48:31 +0100
       
       Convert is stupid, using jhead to rotate images
       
       Diffstat:
         M mkpicindex-static.sh                |       7 +++++--
       
       1 file changed, 5 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/mkpicindex-static.sh b/mkpicindex-static.sh
       t@@ -78,7 +78,9 @@ get_width_by_height() {
            # returns aspect ratio calculated width
            local F="$1"  # image file
            local TH="$2" # target height
       -    local WH="$(identify -format ' %w %h ' "$1" | awk '{ printf("%.3f %.3f",$1,$2) }')"
       +    local WH="$(identify -format ' %w %h ' "$1" | awk '{ printf("%.0f %.0f",$1,$2) }')"
       +    local W="$(printf "$WH" | awk '{ print $1 }')"
       +    local H="$(printf "$WH" | awk '{ print $2 }')"
            local R="$(printf "$WH" | awk -vTH=$TH '{ printf("%.0f", TH*($1/$2)) }')"
            printf '%.0f' "$R"
            debug "get_width_by_height: FILE=$F TARGET_HEIGHT=$TH FILE_WxH=$WH RET_WIDTH=$R"
       t@@ -94,6 +96,7 @@ convert_raw() {
            F="$1" # raw image
            if ! [ -f "${F%%.*}_preview.jpg" ]; then
                dcraw -e -c "$F" > "${F%%.*}_preview.jpg"
       +        jhead -autorot "${F%%.*}_preview.jpg"
                console "Raw Conversion: ${F%%.*}_preview.jpg"
            fi
        }
       t@@ -119,7 +122,7 @@ create_thumb() {
                         printf '%s' "$THUMB_PATH/$T.gif" ;;
                     *)  console "Creating Thumbnail: $THUMB_PATH/$T.jpeg"
                         nohup convert -quality $THUMB_QUALITY -sharpen 2x2 \
       -                          -resize 6000x$H\> "$F" \
       +                               -auto-orient -resize 6000x$H\> "$F" \
                                  "$THUMB_PATH/$T.jpeg" >/dev/null 2>&1 &
                         printf '%s' "$THUMB_PATH/$T.jpeg" ;;
                esac