1. Sam Toyer
  2. xonmaps

Commits

Sam Toyer  committed 8de2910

Optimise jpegs

  • Participants
  • Parent commits bf6aa26
  • Branches default

Comments (0)

Files changed (2)

File convert_thumbs.sh

View file
  • Ignore whitespace
 
 for image in $(find "$1" -type f)
 do
+    outimage="$(echo "$image" | sed -e s/\\.\\w\\+\$/.jpg/)"
     convert -quality 95 -adaptive-resize 200x200\> "$image" "$(echo "$image" | sed -e s/\\.\\w\\+\$/.jpg/)"
+    # optimise jpeg
+    jpegtran -outfile "$outimage" -o "$outimage"
     case "$image" in
         *.jpg) ;;
             *) rm "$image" ;;

File static/sunrise.jpg

  • Ignore whitespace
Old
Old image
New
New image