Estimated read time: 1 minutes
You need imagemagick
installed and this in you .bashrc
. Run with crop selfie.jpg
function crop {
x=$(identify $1 | awk '{print $3}' | cut -d 'x' -f1)
y=$(identify $1 | awk '{print $3}' | cut -d 'x' -f2)
smallest …