Page 1 of 1

Adding text does not work

Posted: Thu Oct 25, 2012 3:18 pm
by Peter2
I used XnConvert to create the code to adding a text. This was the result:

Code: Select all

nconvert -text_font Arial -text_color 0 0 0 -text_back 0 0 0 -text_flag top-left -text_pos 500 400 -text_rotation 0 -text "sdfefhrfghrfh
fhgfhfg
dghfdgh" 
Then I removed the linefeed and added input and output:

Code: Select all

nconvert -text_font Arial -text_color 0 0 0 -text_back 0 0 0 -text_flag top-left -text_pos 500 400 -text_rotation 0 -text "sdfefhrfghrfh" -o y.tif x.tif
The result was that it created "x_1.tif" and a lot of errors:

Code: Select all

Error: Can't open file (0)
Error: Can't open file (0)
Error: Can't open file (0)
Error: Can't open file (-text_back)
Error: ....
What is wrong?
(Current nconvert 6.21)

Peter

Re: Adding text does not work

Posted: Thu Oct 25, 2012 3:47 pm
by Peter2
First progress:
It seem to depend on the font size. The help says:

Code: Select all

          -text_font name size  : Font name and size
Now I used:

Code: Select all

nconvert -quiet -rotate 90 -text "hallo" -text_font Arial 5 -out tiff -c 7 -o y.tif x.tif
It puts the text in the upper-left corner, but "size 5" or "50" or "500" - the result is the same; only a few pixels high.

Then I continued:

Code: Select all

nconvert -quiet -rotate 90 -text "hallo" -text_font Arial 5 -text_flag bottom-left -out tiff -c 7 -o y.tif x.tif
-> The text stays in the upper-left corner.

Peter

Re: Adding text does not work

Posted: Fri Oct 26, 2012 12:33 pm
by xnview
Right for XnConvert, size must be added

Else -text must last command

Code: Select all

nconvert -quiet -rotate 90 -text_font Arial 5 -text_flag bottom-left -text "hallo" -out tiff -c 7 -o y.tif x.tif

Re: Adding text does not work

Posted: Fri Oct 26, 2012 12:56 pm
by Peter2
xnview wrote:Right for XnConvert, size must be added
So the export from XnConvert is wrong.
xnview wrote:Else -text must last command
Thanks. Please add to the "-help command" in nconvert.

Peter