projects
/
anondcim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
59df444
)
fix names of variables
author
fpunktk
<git@fpunktk.de>
Sat, 30 Dec 2017 11:27:31 +0000
(12:27 +0100)
committer
fpunktk
<git@fpunktk.de>
Sat, 30 Dec 2017 11:27:31 +0000
(12:27 +0100)
anondcim
patch
|
blob
|
history
diff --git
a/anondcim
b/anondcim
index feae7667ffaa2845f607ea6f09fa152fb0ca02aa..8fbbccebd49548dac455f810cf6c1745e6da51b5 100755
(executable)
--- a/
anondcim
+++ b/
anondcim
@@
-93,16
+93,16
@@
do
read w h << EOF
$(identify -format '%w %h' "$fn")
EOF
read w h << EOF
$(identify -format '%w %h' "$fn")
EOF
-
+ #
# resize and distort
if [ $w -ge 100 ] && [ $h -ge 100 ]
then
if [ $w -ge 1000 ]; then dw=$(($w / 100)); else dw=10; fi
if [ $h -ge 1000 ]; then dh=$(($h / 100)); else dh=10; fi
# resize and distort
if [ $w -ge 100 ] && [ $h -ge 100 ]
then
if [ $w -ge 1000 ]; then dw=$(($w / 100)); else dw=10; fi
if [ $h -ge 1000 ]; then dh=$(($h / 100)); else dh=10; fi
-
+ #
w=$(($w - 1))
h=$(($h - 1))
w=$(($w - 1))
h=$(($h - 1))
-
+ #
convert "$fn" \
-colorspace RGB \
-distort Perspective "$(rand $dw) $(rand $dh) 0 0, $(($w - $(rand $dw))) $(rand $dh) $w 0, $(rand $dw) $(($h - $(rand $dh))) 0 $h, $(($w - $(rand $dw))) $(($h - $(rand $dh))) $w $h" \
convert "$fn" \
-colorspace RGB \
-distort Perspective "$(rand $dw) $(rand $dh) 0 0, $(($w - $(rand $dw))) $(rand $dh) $w 0, $(rand $dw) $(($h - $(rand $dh))) 0 $h, $(($w - $(rand $dw))) $(($h - $(rand $dh))) $w $h" \
@@
-110,7
+110,7
@@
EOF
-attenuate 2 +noise Uniform \
-resize "$dst_size" \
-colorspace sRGB \
-attenuate 2 +noise Uniform \
-resize "$dst_size" \
-colorspace sRGB \
- "$dst"
+ "$dst
_jpg
"
else
err "image is too small to be distorted and will just be filtered and resized"
convert "$fn" \
else
err "image is too small to be distorted and will just be filtered and resized"
convert "$fn" \
@@
-119,19
+119,19
@@
EOF
-attenuate 2 +noise Uniform \
-resize "$dst_size" \
-colorspace sRGB \
-attenuate 2 +noise Uniform \
-resize "$dst_size" \
-colorspace sRGB \
- "$dst"
+ "$dst
_jpg
"
fi
fi
-
+ #
# remove metadata
if [ -x "$(which jhead)" ]
then
# remove metadata
if [ -x "$(which jhead)" ]
then
- jhead -purejpg -q "$dst" || err "removing meta-data with jhead failed"
+ jhead -purejpg -q "$dst
_jpg
" || err "removing meta-data with jhead failed"
fi
if [ -x "$(which exiftool)" ]
then
fi
if [ -x "$(which exiftool)" ]
then
- exiftool -
overwrite_original -all= "$dst
" || err "removing meta-data with exiftool failed"
+ exiftool -
quiet -overwrite_original -all= "$dst_jpg
" || err "removing meta-data with exiftool failed"
fi
fi
-
+ #
cur=$(($cur + 1))
done
cur=$(($cur + 1))
done