LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Any way to save entire Front Panel to jpeg, not just visible part?

Solved!
Go to solution

So I've used Write to JPEG function to be able to save a JPEG of the current Front Panel. That works fine. But it only saves the portion of the Front Panel that is currently visible. So is there any way to save the entire Front Panel, or even better a specific part of the Front Panel?

0 Kudos
Message 1 of 8
(2,984 Views)

Thank you for attaching your VI so we can see what you tried and suggest other methods (such as using the Front Panel, Get Image Method with Visible Area Only set to False).

 

Bob Schor

0 Kudos
Message 2 of 8
(2,971 Views)

Yeah, Get Image with Visible Area Only set to False gives me too much. I guess that's why I brought up if there's a way to save only a portion of the Front Panel. 

 

And yeah, I'll load up the code shortly. 

0 Kudos
Message 3 of 8
(2,964 Views)

@ShogunOrta wrote:

Yeah, Get Image with Visible Area Only set to False gives me too much.

This probably means you have scattered controls/indicators far away that are most likely not useful to the operator of the program (are they just scaffolds for local variables?). You could reposition them closer or hide them. You can also use code to get an image of a certain control or indicator (e.g. a graph).

 

Without seeing the actual code, it is difficult to tell what "too much" actually means.

0 Kudos
Message 4 of 8
(2,951 Views)
Solution
Accepted by topic author ShogunOrta

Use get image with visible area only, then use pixmap functions (get subset) to truncate the pixmap. Getting the correct coordinates is the tricky part. You'll have to get those with vi server, or use a constant if everything is static.

0 Kudos
Message 5 of 8
(2,946 Views)

That's not exactly what I was looking for, since the area of the Front Panel I want would be outside the "viewing area", but that method of truncating sounds interesting for other matters. Again, sorry, I see I need to upload my code as requested before.

0 Kudos
Message 6 of 8
(2,939 Views)

Here's also an example of how to crop images: http://www.ni.com/example/26547/en/

Some modifications will have to made for larger images, but just wanted to put this here for your reference. 

 

0 Kudos
Message 7 of 8
(2,896 Views)

Definitely thanks for the reference!

0 Kudos
Message 8 of 8
(2,881 Views)