I read Using mogrify (imagemagick) to batch convert all my files (with params) and it seems my query/path is very similar, except the fact that all the pictures in my directory have same Width and Height.
[$] mediainfo 20160714_161847.jpg General Complete name : 20160714_161847.jpg Format : JPEG File size : 2.66 MiB Image Format : JPEG Width : 4 128 pixels Height : 2 322 pixels Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Compression mode : Lossy Stream size : 2.66 MiB (100%)
Now I would like to batch compress them to another directory altogether so the original/parent pictures are not touched. I do know that any compression would basically be taking information out of the picture and would have some artefacts.
Just to be more explicit, let's say the number of the directories are -
/home/shirish/input_directory/*.jpg - input_directory has all the .jpgs which need to be shrinked/trimmed so that they are ok for web-publishing.
/home/shirish/output_directory/ - This is where the manipulated pictures should end up being. The original pictures should not be touched at all and remain where they are.
A nice touch would be if there is a way to also see the progress of the manipulation as it goes through the pictures either with just as ASCII bar or preferably with telling how many number of images are done out of how many it is going to do along with the console/ascii bar.
What is intersting to note is that the sample image does not seem to have any gps information even though I am sure some of the images in the collection have that information. Is there also a way to search/grep through all the images to see if there is location-aware information (GPS co-ordinates) or something similar in the images.
Update - Just to share it worked - see -
~/Pictures/original$ mogrify -path /home/shirish/Pictures/reduced -monitor -quality 70 -trim -resize '>'600x480 *.jpg load image[asus-prime-Z270-p-lga1151-motherboard.jpg]: 1215 of 1216, 100% complete Resize/Image//home/shirish/Pictures/reduced[asus-prime-Z270-p-lga1151-motherboard.jpg]: 1052 of 1053, 100% complete Save/Image//home/shirish/Pictures/reduced[asus-prime-Z270-p-lga1151-motherboard.jpg]: 479 of 480, 100% complete
The only thing I don't know is from where does imagemagick get the numbering but that's for another day, another question altogether :)