09-04-2017 01:11 PM
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?
Solved! Go to Solution.
09-04-2017 01:40 PM
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
09-04-2017 01:49 PM
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.
09-04-2017 02:28 PM
@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.
09-04-2017 02:35 PM
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.
09-04-2017 03:12 PM
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.
09-05-2017 01:22 PM
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.
09-05-2017 02:30 PM
Definitely thanks for the reference!