Hi
I wanted to add some EXIF data as text to an image, something I have done in xnconvert. I then tried to export as an nconvert command and it crashed. The following command *donest* work but Im not sure what the exact syntax should be from the helpfile:
..\nconvert -out jpeg -text_string 'Day 01: {EXIF:Date [H:M]}' -text_font 'Gill Sans MT Condensed' 20.00 -text_color 0 0 0 -text_pos 10 460 GOPR3908.jpg
(although the helpfile says 'text string')
Any help much appreciated!!
thanks
mike
Adding Text: Command line??
Moderators: XnTriq, helmut, xnview
-
- XnThusiast
- Posts: 4186
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Adding Text: Command line??
I think you may have multiple issues but I'm not entirely sure.miksmith wrote:I wanted to add some EXIF data as text to an image, something I have done in xnconvert. I then tried to export as an nconvert command and it crashed. The following command *doesn't* work but Im not sure what the exact syntax should be from the helpfile:
Code: Select all
..\nconvert -out jpeg -text_string 'Day 01: {EXIF:Date [H:M]}' -text_font 'Gill Sans MT Condensed' 20.00 -text_color 0 0 0 -text_pos 10 460 GOPR3908.jpg
First, in the help file listing...
Code: Select all
-text string : Add a text
Second, I don't see a way of entering EXIF data in XnConvert 1.71, so possibly I'm missing something, or possibly it isn't suported.
I would suggest making a quick test to just enter a simple string such as abc and get that working first.
-
- Posts: 18
- Joined: Wed Jun 17, 2009 3:04 pm
Re: Adding Text: Command line??
Thanks for the nudge there - helped me experiment further and got the export to nconvert to work (i.e. it didnt crash). This was what it gave me
nconvert -out jpeg -text_font MS Shell Dlg 2 32 -text_color 32 255 0 -text_back 127 0 0 -text_flag top-left -text_pos 10 240 -text_rotation 0 -text "{EXIF:Date [m-d]}" GOPR3908.JPG
which doesnt work. "-text" works on its own with quotation marks as you found however It really doesnt like those spaces between parameters. Ive tried font, colour and position none of which work in or out of quotes (single or double).
It works through xnconvert fine, I just wanted to script it if I could
cheers
m
nconvert -out jpeg -text_font MS Shell Dlg 2 32 -text_color 32 255 0 -text_back 127 0 0 -text_flag top-left -text_pos 10 240 -text_rotation 0 -text "{EXIF:Date [m-d]}" GOPR3908.JPG
which doesnt work. "-text" works on its own with quotation marks as you found however It really doesnt like those spaces between parameters. Ive tried font, colour and position none of which work in or out of quotes (single or double).
It works through xnconvert fine, I just wanted to script it if I could
cheers
m
-
- XnThusiast
- Posts: 4186
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Adding Text: Command line??
I'm not quite sure what you wish to do, but this code exported from XnView Classic works with the input and output file info added:
I also see that EXIF text is supported in XnView Classic batch conversion (but not in XnConvert as far as I can see), so possibly you can continue experimenting...
Code: Select all
nconvert -text_font Calibri 100 -text_color 0 0 0 -text_back 255 255 255 -text_flag top-left -text_pos 0 0 -text_rotation 0 -text "abc" -o image_o.jpg image.jpg
You do not have the required permissions to view the files attached to this post.
-
- Posts: 18
- Joined: Wed Jun 17, 2009 3:04 pm
Re: Adding Text: Command line??
Thats got me nearly to the end! The font, color and positioning all work (for fonts with spaces in the names you need to put them in quotations).
Final thing then.... the EXIF data dont seem to be supported (it is in xnconvert as well as classic as Ive used it in both).
Thanks for the help!!
Final thing then.... the EXIF data dont seem to be supported (it is in xnconvert as well as classic as Ive used it in both).
Thanks for the help!!