I'd like to resize a lot of pictures which are in subdirectories. all the pictures are stored in /home/username/Pictures
With Image Magick I can resize a single picture by:
convert -size 1024 somefile.jpg -resize 1024 ./newsize1024/somefile1024.jpg
But now I want to resize all the pictures in current and all subdirectories without doing it manually.
Can u guys help me out with a command, bash script, c code or some other code? (i prefer the easiest way)
thnx in advance!
can the solution contain the solution to resize the picture to the highest dimension?
convert (from the image magick package) has a -resize option. this option can only resize to the maximum width, eg:
convert -resize 1024 somefile.jpg
with picture size: 2048x1572 to 1024x786
but with picture size: 1572x2048 to 1024x1334
which would output: 1024x786 and 786x1024