I have folder of JPEG files named 0_0, 0_1, 1_0, 1_1, etc. First number is column and second one is row. I want to combine them into one JPEG file. How would I go about doing this? I have looked into ImageMagick but I don't know what parameters to use and how.
Asked
Active
Viewed 923 times
2 Answers
2
Relevant ImageMagick documentation is here.
Try:
montage -geometry +0+0 0_0.jpg 0_1.jpg 1_0.jpg 1_1.jpg output.jpg
Mike Fitzpatrick
- 16,997
2
The solution is
montage.exe -mode concatenate -tile 1x14 [0-9]*_[0-9]*.jpg miff:- | convert.exe - +append final.jpg
Note: If you have pictures with double-digit number (4_15, 10_1), You must add a zero to the files with numbers from 0-9 (04_15, 10_01)
This RegEx will take care of that (Bulk Rename Utility)
Search: (\d{1})_(\d{1}).jpg
Replace: 0\1_0\2
CodeBreaker
- 181
montage.exe -mode concatenate -tile 1x14 [0-9]*_[0-9]*.jpg miff:- | convert.exe - +append final.jpgand renaming allX_0-X_9toX_00-X_09with this RegEx Search:(\d{1})_(\d{1}).jpgand replace:\1_0\2– CodeBreaker May 23 '15 at 09:18