how to insert "Creation date" as a text in an picture

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: helmut, XnTriq, xnview

Post Reply
poudou99
Posts: 6
Joined: Mon May 18, 2009 12:29 pm

how to insert "Creation date" as a text in an picture

Post by poudou99 »

Hello

I continue my previous messages here in english

I am trying to insert the "Creation Date" of a list of pictures inside the pictures as a text

After having made several tries (seeing how xnview does with conversion/Batch)
here is what I am trying to do:

SET PRG="E:\Program Files\XnView\NConvert"
SET SRC="IN-##.jpg"
SET DST="OUT-##.jpg"
%PRG% -npcd 2 -size 256x256+0 -ctype grey -corder inter -out jpeg -n 0 23 1 -text "<Creation Date [d/m/Y H:M]>" -o %DST% %SRC%


But it does not run, it inserts the text "<Creation Date [d/m/Y H:M]>" itselft instead of the date like XnView does

I certainly make mistakes. But, I do not know what parameter(s) I can use to do the same thing like xnview does

Thanks
User avatar
xnview
Author of XnView
Posts: 46362
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: how to insert "Creation date" as a text in an picture

Post by xnview »

poudou99 wrote: But it does not run, it inserts the text "<Creation Date [d/m/Y H:M]>" itselft instead of the date like XnView does
Currently nconvert doesn't support <...> info like xnview
Pierre.
poudou99
Posts: 6
Joined: Mon May 18, 2009 12:29 pm

Re: how to insert "Creation date" as a text in an picture

Post by poudou99 »

xnview wrote:
poudou99 wrote: But it does not run, it inserts the text "<Creation Date [d/m/Y H:M]>" itselft instead of the date like XnView does
Currently nconvert doesn't support <...> info like xnview
Ok, thanks
I will try something else

I will try to develop a BAT which retrieves the DATE/TIME of the file and then insert it as a text in the picture using Nconvert
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: how to insert "Creation date" as a text in an picture

Post by helmut »

poudou99 wrote:I will try to develop a BAT which retrieves the DATE/TIME of the file and then insert it as a text in the picture using Nconvert
With a batch file this might be possible. There's ways to extract parts for the date and string them together, an example which uses the currrent date:

Code: Select all

set CREATION_DATE=%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%
poudou99
Posts: 6
Joined: Mon May 18, 2009 12:29 pm

Re: how to insert "Creation date" as a text in an picture

Post by poudou99 »

helmut wrote:With a batch file this might be possible. There's ways to extract parts for the date and string them together, an example which uses the currrent date:

Code: Select all

set CREATION_DATE=%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2%
I did something like that
thanks
Post Reply