After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 184 KiB |
After Width: | Height: | Size: 200 KiB |
After Width: | Height: | Size: 137 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 267 KiB |
After Width: | Height: | Size: 384 KiB |
After Width: | Height: | Size: 784 KiB |
After Width: | Height: | Size: 263 KiB |
After Width: | Height: | Size: 179 KiB |
After Width: | Height: | Size: 540 KiB |
After Width: | Height: | Size: 509 KiB |
After Width: | Height: | Size: 526 KiB |
After Width: | Height: | Size: 475 KiB |
After Width: | Height: | Size: 526 KiB |
After Width: | Height: | Size: 591 KiB |
After Width: | Height: | Size: 366 KiB |
After Width: | Height: | Size: 286 KiB |
After Width: | Height: | Size: 278 KiB |
After Width: | Height: | Size: 315 KiB |
After Width: | Height: | Size: 563 KiB |
After Width: | Height: | Size: 802 KiB |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 554 KiB |
After Width: | Height: | Size: 377 KiB |
After Width: | Height: | Size: 484 KiB |
After Width: | Height: | Size: 539 KiB |
After Width: | Height: | Size: 964 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 2.5 MiB |
After Width: | Height: | Size: 943 KiB |
After Width: | Height: | Size: 661 KiB |
After Width: | Height: | Size: 726 KiB |
After Width: | Height: | Size: 826 KiB |
After Width: | Height: | Size: 1.4 MiB |
After Width: | Height: | Size: 2.0 MiB |
After Width: | Height: | Size: 3.6 MiB |
After Width: | Height: | Size: 1.4 MiB |
After Width: | Height: | Size: 1004 KiB |
After Width: | Height: | Size: 1003 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 2.0 MiB |
After Width: | Height: | Size: 2.8 MiB |
After Width: | Height: | Size: 4.9 MiB |
After Width: | Height: | Size: 1.9 MiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 271 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 113 KiB |
After Width: | Height: | Size: 213 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 167 KiB |
After Width: | Height: | Size: 173 KiB |
After Width: | Height: | Size: 162 KiB |
After Width: | Height: | Size: 155 KiB |
After Width: | Height: | Size: 169 KiB |
After Width: | Height: | Size: 200 KiB |
Before Width: | Height: | Size: 309 KiB After Width: | Height: | Size: 302 KiB |
Before Width: | Height: | Size: 218 KiB After Width: | Height: | Size: 215 KiB |
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 248 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 243 KiB After Width: | Height: | Size: 242 KiB |
Before Width: | Height: | Size: 290 KiB After Width: | Height: | Size: 290 KiB |
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 3.3 MiB |
Before Width: | Height: | Size: 2.9 MiB After Width: | Height: | Size: 2.9 MiB |
Before Width: | Height: | Size: 5.4 MiB After Width: | Height: | Size: 5.4 MiB |
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.3 MiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 497 KiB After Width: | Height: | Size: 497 KiB |
Before Width: | Height: | Size: 487 KiB After Width: | Height: | Size: 487 KiB |
Before Width: | Height: | Size: 485 KiB After Width: | Height: | Size: 485 KiB |
Before Width: | Height: | Size: 456 KiB After Width: | Height: | Size: 456 KiB |
Before Width: | Height: | Size: 474 KiB After Width: | Height: | Size: 474 KiB |
Before Width: | Height: | Size: 532 KiB After Width: | Height: | Size: 532 KiB |
@ -0,0 +1,39 @@ |
||||
#!/bin/sh |
||||
|
||||
# requires imagemagick and perl-image-exiftool |
||||
|
||||
set -e |
||||
|
||||
widths="500 1000 1500 2000 2500 3000" |
||||
|
||||
for img in $@; do |
||||
echo $img |
||||
|
||||
# make target directories |
||||
dir=$(dirname "$img") # gets directory |
||||
for targetWidth in $widths; do |
||||
mkdir -p $dir/${targetWidth}px |
||||
done |
||||
|
||||
# get width |
||||
width=$(identify "$img" | awk '{print $3}' | cut -dx -f1) |
||||
echo -e "\toriginal width: $width" |
||||
|
||||
echo -e "\tremoving metadata" |
||||
exiftool -all= "$img" |
||||
rm -f "${img}_original" # exiftool makes a copy of the original, delete it |
||||
|
||||
for targetWidth in $widths; do |
||||
targetFile=$dir/${targetWidth}px/$(basename "$img") |
||||
echo -en "\tresizing into $targetFile... " |
||||
if [ "$targetWidth" -ge "$width" ]; then |
||||
echo "skipping, original image too small" |
||||
continue |
||||
elif [ -e "$targetFile" ]; then |
||||
echo "skipping, target file exists" |
||||
continue |
||||
fi |
||||
convert "$img" -resize $targetWidth "$targetFile" |
||||
echo "done" |
||||
done |
||||
done |