I have a large (+18000) batch of .TIFFs I need to process. I want to burn the [Image name] onto the image itself. I have already tried FFmpeg, but someone told me magick could be faster.
I'm having trouble getting the code to work. I have tried using a [forfiles] loop already, but it's much slower than FFmpeg. So, I went with mogrify.
My issue is that mogrify doesn't like my wildcards (C:\path\*.TIFF) nor my escape (%f for filename, see on the code below). When I do it image by image, it works fine and dandy, and magick understands %f as it's supposed to (the file's name as string). BUT when I use mogrify to batch process the whole thing... Nope.
Here's my code, just in case:
Code: Select all
magick mogrify "C:\Users\pablo\Desktop\try\*.TIFF" -fill white -pointsize 30 -gravity northwest -annotate 0 %f "C:\Users\pablo\Desktop\try\*.TIFF"
I also tried not giving it an output, giving it a different one... nothing.
This forfiles loop works:
master.bat:
Code: Select all
forfiles /p "C:\Users\pablo\try" /m "*.TIFF" /S /C "cmd /c C:\Users\pablo\Desktop\image.bat @file @fname"
Code: Select all
magick mogrify "%~1" -fill white -pointsize 30 -gravity northwest -annotate 0 %~2 C:\Users\pablo\try\%~2.TIFF
Thank you in advance :)
Winx64, ImageMagick 7.0.8-6 q16 x64, i7 770HQ, GTX 1050 4GB