Saving Measurement Studio CNiPicture to a Bitmap File Using GDI+Primary Software: Measurement Studio>>Visual C++ SupportPrimary Software Version: 7.0 Primary Software Fixed Version: 7.1 Secondary Software: N/A
Problem: The Measurement Studio Visual C++ libraries return images as CNiPictures. How do I save these to a file as bitmap? Solution: You can save the image to a file using the GDI+ API. GDI+ is available with Microsoft Visual Studio 2003 and higher. GDI+ provides classes for drawing and manipulating graphics. Add the following to your stdafx.h: Assuming that you have a CNiGraph variable called graph, the following code creates a bitmap of the graph and saves it as a file named graph.bmp in the root directory of your C drive: You can also save the image to PNG, JPEG, and GIF formats. For more information, refer to the function reference help for CImage::Save. Related Links: NI Discussion Forums: How to get a bitmap from CNiGraph in VC++ GDI+ Attachments:
Report Date: 07/22/2005 Last Updated: 05/07/2006 Document ID: 3NLH9U5B |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
