LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read wmf activex

Hello,

 

   Does anyone know how to read a WMF (Windows MetaFile) in Labview 8.2?

 

Regards,

 

Kaspar

Regards,


Kaspar
0 Kudos
Message 1 of 13
(4,930 Views)

Image Toolbox ($) supports bmp, gif, jpg, png, tiff, wmf, emf, ico, etc. file formats. Support 1, 4, 8, 16, 24, 32 and 48 bit images.

George Zou
Message 2 of 13
(4,923 Views)

Hello,

 

    Yes I know about the image toolbox, it costs money, but the process that the company I work for is very time consuming/ etc. Does anyone have something that I could get for free?

 

Regards,

 

Kaspar

Regards,


Kaspar
0 Kudos
Message 3 of 13
(4,918 Views)

You can try using .NET.

 

         using System.Drawing;
         using System.Drawing.Imaging;

         ...

         Image i = Image.FromFile("InputFile.wmf" );

 

What exactly are you trying to do with the wmf file? 

Message Edited by smercurio_fc on 08-26-2008 03:36 PM
Message 4 of 13
(4,902 Views)

Hello,

 

  I will try the .Net and let you know what happens. I am trying to do image capture from a spectrum analyzer and it only outputs gifs and wmf files. I want to be able to see them in labview.

 

Regards,

 

Kaspar

Regards,


Kaspar
0 Kudos
Message 5 of 13
(4,895 Views)

You can also just use the Bitmap class:

 

 

Message 6 of 13
(4,889 Views)

Hello,

 

   I am a little bit slow this morning. Where on the block diagram do you find the various classes that you mention above? I have gone to the application control pallette and selected a property note and then right clicked to Select a class and got lost. There are alot of options for finding the classes.

 

Regards,

 

 

Kaspar.

Regards,


Kaspar
0 Kudos
Message 7 of 13
(4,857 Views)

From left to right you have a .NET constructor and a .NET property node. Both items are in the Connectivity -> .NET palette. The front panel has a .NET container and in the container is a picture box, which is available in the .NET & Active X palette.

 

For the Bitmap class:

  1. Place a .NET constructor on the block diagram.
  2. When the dialog pops up select "System.Drawing" from the Assembly pull-down menu.
  3. In the Objects listbox expand the "System.Drawing" namespace.
  4. Select the "Bitmap" class.
  5. You will see all of the available constructors for the Bitmap class. The one I used was "Bitmap(String filename)".
A VI is available here.
Message 8 of 13
(4,848 Views)

Hello,

 

   Thanks for the response.:smiley very-happy: I got the code to work that displays the WMF file in a picture box. The next step in the adventure iis to save the data as a BMP file so that the screenshots of the test equipment I am working on is all in a consistent format, which is BMP.

 

Regards,

 

Kaspar!

Regards,


Kaspar
0 Kudos
Message 9 of 13
(4,836 Views)

Bitmap.Save(String filename)

 

System.Drawing.Bitmap 

Message 10 of 13
(4,831 Views)