This VI demonstrates how to programmatically save a Waveform Graph to file using different image formats and color depths.
The available image formats for saving are JPEG, BMP, and PNG. There are also four different color depth options which include:
1) 1-bit (Black & White)
2) 4-bit (16 colors)
3) 8-bit (256 colors)
4) 24-bit (True colors)
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.