I am looking to create an index page for each of my folders that contain images. I would like on the index page to be the first 6 images of the directory combined to a 1200x1000 (3 columns 2 rows) image. I am trying to do this in windows prompt. Is it possible?
I have found that I can use this:
Code: Select all
montage *.jpg -geometry 400x500 -background black -tile 3x2 out.jpg
I have found this nifty script online to catch the first 6 images of the folder but cannot figure out how to incorporate it into a batch script for use with imagemagick/montage.
Code: Select all
@echo off
setlocal
set /a "n=0, limit=6"
>"testfile1.txt" (
for /f "eol=: delims=" %%F in ('dir /on /b *.*') do (
echo %%F
2>nul set /a "n+=1, 1/(limit-n)"||goto :break
)
)
:break