fmw42 wrote:filename1=`convert myfile-000.png -format "%t" info:` gives the top of the filename (no suffix)
filename1=`convert myfile-000.png -format "%f" info:` gives the full filename with suffix
see
http://www.imagemagick.org/script/escape.php
This won't work as I don't know what the PNG will be.
As I said, I convert PDF to PNG and it can produce multiple PNGs file.
I think using "-format" is the right direction, but not sure how to make it work.
I have tried, for example, following
Code: Select all
convert -density 400 myfile.pdf myfile-%03d.png -format "%f" info:
However, it would give me (say, my PDF has 3 pages)
while I actually want this
Code: Select all
myfile-000.png myfile-001.png myfile-002.png