LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write text to picture and save it

Hi!

What I want to do is to write a text (e.g. a date) to a picture. It should be displayed in picture control and saved to jpeg-file.
Aquiring the image and saving it works well. But how do I write text to it??? I do not have the Vision-toolkit. Is there any other way??

Thanks
Starter
0 Kudos
Message 1 of 8
(8,573 Views)
> What I want to do is to write a text (e.g. a date) to a picture. It
> should be displayed in picture control and saved to jpeg-file.
> Aquiring the image and saving it works well. But how do I write text
> to it??? I do not have the Vision-toolkit. Is there any other way??
>

If you are asking how to write text to a picture control on top of an
image, you are one icon away. You want the functions Draw Text at
Point.vi and it is located in the Picture functions, right next to where
the Write JPEG is located. Pass the existing picture wire through the
text icon to add another layer, then into the terminal.

Greg McKaskle
0 Kudos
Message 2 of 8
(8,573 Views)
It's me again!

Thank you for answering my question. I am now able to draw text to the picture, but somehow it seems to be impossible to convert the new image to 2D Array so that I can write it to jpg-file. Any idea?

Thanks
Starter
0 Kudos
Message 3 of 8
(8,573 Views)
Hi,

Saving the contents on the picture control to a jpg can be done using the Invoke node "Get Image" method. This will return the parameters required for the "Write JPEG File.vi".

I have attached a VI to demonstrate this....

P.S Its another one of those LabVIEW things that is straightforward, but is mind boggling to figure out yourself. 😃

Charles ElBayeh
Applications Engineer
Madry Technologies, NI Alliance Member
www.madry.com.au
0 Kudos
Message 4 of 8
(8,573 Views)
> Thank you for answering my question. I am now able to draw text to the
> picture, but somehow it seems to be impossible to convert the new
> image to 2D Array so that I can write it to jpg-file. Any idea?
>

If you have LV7, there is a function called Picture to Pixmap..vi. It
will render the picture into a pixmap. If you don't have this, you can
use the control method to Get Image.

Greg McKaskle
0 Kudos
Message 5 of 8
(8,573 Views)
Okay - so we got one step further again. I'm using LabView 6.1 - so I now use the GetImage.vi! But unfortunately it returns the controls border, too. Is there a way to cut this??

Thanks
Starter
0 Kudos
Message 6 of 8
(8,573 Views)

i usually draw text to pictures c#  with rasteredge's  image editing tool. and use the converter to convert to any formats i want. not so difficult unless i am not catch your meaning totally.

0 Kudos
Message 7 of 8
(7,463 Views)

Hello,

 

I´m using IMAQ DRAW TEXT. It works quite fine, but I can´t manage to change the font size. It does not matter the value I specify 20-200 the result is the same. Any ide what  that could be?

0 Kudos
Message 8 of 8
(7,062 Views)