LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert a text report to an image

To protect from editing a text report, I want to make an watermarked image(any format and bit) from the text report which has already been made.
How to do this work? Does Any funciton exist in LV8.2?
0 Kudos
Message 1 of 9
(3,898 Views)
There is "Draw text at point.vi". I didn't find something more general in LV 8.2
_________________________________________________________________________________________________
LV 8.2 at Windows & Linux


0 Kudos
Message 2 of 9
(3,889 Views)

hi there

you could show the report on a VIs front panel in a string control and then use the "GetImage" method of the control. see attached example...

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 3 of 9
(3,882 Views)

That's good idea.

However, do you know how to insert a watermarked image (such as company logo) to the created image?

0 Kudos
Message 4 of 9
(3,867 Views)

hi there

try this:

1. create an image of your watermark (use same bitdepth as in GetImage method and same size as your control). Use BLACK as background (0x000000)
2. unflatten watermark with UnflattenPixmap.vi
3. execute GetImage at the controls reference and unflatten with UnflattenPixmap.vi
4. Sum the "Pixmap" arrays of both unflattenend pixmaps
5. Flatten summarized pixmaps and save as picture

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 5 of 9
(3,857 Views)
Hmm... How about this?

1.   Load the report image into a picture control.
2.    You can load an image file (PNG, JPG, BMP) using the VIs under "Graphics and Sound"->"Graphics Formats".  Load your watermark image into a separate picture control.
3.   Make the watermark picture control transparent, and place it over the report picture control. 

As long as the watermark image has the same background color as the text (i.e. white), they'll be superimposed.  I haven't been able to get transparency in images to work. (PNG files support transparency, but I don't think the picture control does?)  Thus, you're going to have to put the watermark someplace where it won't overlap the text, maybe like a letterhead.

4.   Get an image of the front panel, thus capturing both images superimposed.

It's convoluted, but it might just work.  There's got to be a better way, but I don't know about it.

Jim
0 Kudos
Message 6 of 9
(3,855 Views)
Chris' idea might be more elegant than mine.  Smiley Wink
0 Kudos
Message 7 of 9
(3,850 Views)

lets merge:

1.   Load the report as TEXT to the control and make the BG color of the control to Transparent
2.   place the watermark picture UNDER the text-control
3.   Get the image of the whole VIs Front Panel using methods


 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 8 of 9
(3,848 Views)

Thanks all.

I was a beginner in image programming.

I will try above.

0 Kudos
Message 9 of 9
(3,842 Views)