Hehehe, no worries. I thought I tried everything I could think of before my head hit the keyboard and I passed out.
Is there a way to make this work on filenames that have spaces in them? It chokes on spaces in the filenames. However, I started brainstorming a few ideas and I think I'm kinda sorta onto something, though being an IM noob is hindering progress... Here's what I'm trying:
Code: Select all
FOR %%F IN (*.tga) DO composite -compose Dst_over -tile pattern:checkerboard -size 10x10 %%F %%~nF.png
montage *.png -background "transparent" -depth 8 -type TrueColorMatte -geometry 110x110+9+9 -tile 4x3 Grid.png
convert e:\img_output\IM_RSRC\Header.png Grid.png -append Merged.png
Here's what I did prior to that:
I renamed all the files to 01.tga 02.tga 03.tga etc etc, just for the testing phase, though getting this to work on filenames with spaces is going to be a necessity.
I replaced -tile 4x with -tile 4x3 in montage and noticed that if there are >12 images and the output of that line is Grid.tga, it stops after creating Grid.tga (leaving out the 13th+ files)
If there are >12 images with -tile 4x3 and the output of montage is Grid.png, it creates Grid-0.png and Grid-1.png and so on.. so that'll be good for larger folders (though I'm not sure how to handle the wildcards/substitutions for '-0' and '-1' and '-etc' when it comes to using those in later steps, but anyway, for testing purposes I've restricted this to a folder of less than 12 images just so I could see if it'll work in concept)
I cropped the header area from the original backdrop image and saved it as a separate 512x128 image called Header.png
The convert line of my batch code generates an error and I'm not sure why
Code: Select all
E:\img_output>convert e:\img_output\IM_RSRC\Header.png Grid.png -append Merged.png
Invalid Parameter - Grid.png
still working on it, but basically what I'm attempting is:
1. montage the 4x3 Grids (Grid-0.png, Grid-1.png, Grid-2.png and so on... automatically at 512x384 and transparent backgrounds)
2. append the new 512x128 header.png vertically above the 512x384 Grid PNGs (which should give me 512x512 images), and then save as Merged-0.png, Merged-1.png etc etc
3. Superimpose 512x512 Merged.png over the original 512x512 "Backdrop.png" (the one with the lightly textured background) and save as AlmostDone.png, though this step isn't in my batch code yet because the append step isn't working...
SIDE NOTE: appended files don't have to all be the same dimensions do they? Is it the colon in the e:\path\ ?
4. Superimpose 512x512 Copyright.png over AlmostDone.png and save as FinallyDone.png
-ohai