How to cut from the bottom 20% recursively in Bash? if the image size is less than 200px?
Tried the method, but erroneously
find -name "*.jpg" -crop 20%height -quality 100 {} \;
How to cut from the bottom 20% recursively in Bash? if the image size is less than 200px?
Tried the method, but erroneously
find -name "*.jpg" -crop 20%height -quality 100 {} \;
How to cut from the bottom 20% recursively in Bash? if the image size is less than 200px?
I don't know what you mean by if the image size less than 200px.
Or do you actually mean this?
How to find all my pictures recursively, chop 20% off from the bottom of each picture and save them losslessly (quality 100% so no .jpeg) to a new filename?
If that is the case then install imagemagick
and run the following script:
#!/bin/bash
shopt -s globstar nullglob
for image in **/*.jpg
do
convert "$image" -gravity North -crop 100x80%+0+0 +repage "${image%.jpg}.png"
done