Open 7dir opened 5 years ago
Lines | 5:4 = 1,25 | 4:3 = 1,3 | 3:2 = 1,5 | 16:10 = 1,6 | 5:3 = 1,6 | 16:9 = 1,7 | 64:27 = 2,370 |
---|
mogrify -path ./results/ -resize 720x480^ -gravity Center -extent 720x480 ./*.jpg
identify -ping -format '%w/%h' photo.jpg
awk "BEGIN {print `identify -ping -format '%w/%h' result.jpg | tr -d "\n"`}" | tr -d "\n"
for i in `ls 800/`; do convert 800/$i -resize 800x800 $i; done
tree -J folder
[
{"type":"directory","name":"Ландшафт","contents":[
{"type":"directory","name":"Завитинск Спортплощадка","contents":[
{"type":"file","name":"1 копия.jpg"},
{"type":"file","name":"2.jpg"},
{"type":"file","name":"3.jpg"},
{"type":"file","name":"фотошоп.jpg"}
]},
{"type":"directory","name":"Парк Белогорск","contents":[
{"type":"file","name":"п1.jpg"},
{"type":"file","name":"п2.jpg"},
{"type":"file","name":"п3.jpg"},
{"type":"file","name":"п4.jpg"},
{"type":"file","name":"п5.jpg"}
]}
]}
]
for i in `find ./` ; do identify -ping -format '%w/%h' $i && echo " "; done
convert image001.png -crop 800x600+190+210 i800x600.png
for i in `find ./` ; do convert $i -crop 800x600+185+205 `echo "../"$i`; done
#!/bin/bash
#enter input encoding here
FROM_ENCODING="cp1251"
#output encoding(UTF-8)
TO_ENCODING="utf-8"
#convert
CONVERT=" iconv -f $FROM_ENCODING -t $TO_ENCODING"
#loop to convert multiple files
for file in *; do
$CONVERT "$file" -o "${file%}"
done
exit 0
dwebp 1.webp -o 1.png