Timestamp out of filename
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Timestamp out of filename
You need a space before and after every \( and \) .
snibgo's IM pages: im.snibgo.com
Re: Timestamp out of filename
Thank you, now it works.
But one more thing:
I tried for another action
On the HP of Imagemagick it says that composite knows how to deal with -set but i get:
unrecognized option -set @ error/composite.c/CompositeImageCommand/1438
I make several steps with 2016081711230002dBuZ.ppi_top.png and always want to keep the filename similar, just with an _1 or _2 at the end.
How can i do this?
But one more thing:
I tried for another action
Code: Select all
composite 2016081711230002dBuZ.ppi_top.png -set filename:f "%[t]" -gravity center Background_final.png "%[filename:f]_2.png"
unrecognized option -set @ error/composite.c/CompositeImageCommand/1438
I make several steps with 2016081711230002dBuZ.ppi_top.png and always want to keep the filename similar, just with an _1 or _2 at the end.
How can i do this?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Timestamp out of filename
I never use "composite". It can't do anything that "convert" can do, and "convert" is maintained better.
snibgo's IM pages: im.snibgo.com
Re: Timestamp out of filename
Thank you
This works so far
But how can i tell to read the second filename? now my output is:
Background_final_2.png but i want 2016081711230002dBuZ.ppi_top_2.png
But if i change it, the background will be on top.
This works so far
Code: Select all
convert Background_final.png 2016081711230002dBuZ.ppi_top.png -set filename:f "%[t]" -gravity center -composite "%[filename:f]_2.png"
Background_final_2.png but i want 2016081711230002dBuZ.ppi_top_2.png
But if i change it, the background will be on top.
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Timestamp out of filename
I'm not sure I understand, but it looks like you want the output file name to come from the second input file. That "%[filename:f]" variable doesn't always behave the way you might expect, so I use a workaround like this...max2331 wrote:But how can i tell to read the second filename?
Code: Select all
convert Background_final.png \
\( 2016081711230002dBuZ.ppi_top.png -set option:fname "%[t]" \) \
-composite -set filename:f "%[fname]" "output_%[filename:f].png"