LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i convert .gif/.bmp/.jpeg file to labview code(vi)?

Hi,
I am having a .gif file which consists of vi code. I want to convert that .gif file into vi & complile it. I am using LV 6.1 & 7 express. Is is possible?
Reverse is surely possible like we can convert the vi diagram into .gif/.bmp file? But above i dont know?

Your help will really appreciated.

Best Regards,
Nirmal
0 Kudos
Message 1 of 10
(4,407 Views)
Hi Nirmal,

The feature you want/need is unfortunately not implemented in LV 6.1 nor 7 and will for sure not be implemented in the next LV version too.

Regards,
Luca
Regards,
Luca
Message 2 of 10
(4,407 Views)
Hi Nirmal,

Can you describe exactly what you are trying to achieve? Maybe there is a solution.

It might require a bit of work, but that's part of the fun, right?

;O)

JLV
Message 3 of 10
(4,407 Views)
Try Image Toolbox at:

http://www.geocities.com/gzou999/index.html

You can read/write bmp, jpg, gif, png, tiff, ico, wmf, & emf files programmatically, and display the image in LabVIEW picture control.

If you want diaplay an image on front panel in edit mode, simply drag & drop the image file onto the front panel.

George Zou
http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 4 of 10
(4,407 Views)
Thanx for your help, Luca.

As we know similar is possible for C code, for example i have sample code put on the some web page, i can copy it in notepad file & save it as .c file & compile it directly.

I feel if this feature is possible in LV, it will really give a great help for direct conversion into LV code. I request you to put as feedback to NI.

Best Regards,
Nirmal
0 Kudos
Message 5 of 10
(4,407 Views)
You can copy C code from a web page and compile it because it's still in text form and made up of individual characters that can be parsed. A .gif or similar image file is simply one object - if you took a screendump of a text editor containing C source code you'd have to have a program that identified all the text characters in the picture in order to generate a text file to compile.

Trying to do something similar with LabVIEW would be a nightmare - you'd need some way of identifying every function and sub-VI icon and matching it to a sub-VI somewhere on the PC's hard drive, including icons you've made for your own sub-VIs and possibly dealing with duplicates. Not forgetting you'd need to work out where all the wires were going, including ones w
hich cross over, to get the dataflow. And as for the hidden frames in Case and Sequence structures etc...
0 Kudos
Message 6 of 10
(4,407 Views)
Thanx Anchovie for your appreciable help.

Regards,
Nirmal
0 Kudos
Message 7 of 10
(4,407 Views)
If you want to give feedback to NI about product improvement, go to the main web page (www.ni.com). Select "Contact NI" and choose product feedback. These suggestions go straight to the NI managers--the people that can make suggestions happen.
0 Kudos
Message 8 of 10
(4,407 Views)
If I understand your desire, it's to be able to convert a graphical image (bit map or screen photo, for example) into a functional block of LabView code, with all of the wire work done, etc. This is a task approximately equivalent to performing optical character recognition.

In the case of a non-system subvi, unless that subvi is loaded, so that it's graphical representation can be recognized by comparing the bit-map image for the subvi on the photo with the available vi's.

Another difficult problem to solve is when the bit-map has been scaled up or down, such that there's a pixel count mismatch between the VI iconic bitmap and the photographic bitmap you wish to import into your code diagram.

And if you try to do recognition on objects that have h
ad their RGB color representations changed, as can happen when JPG compression or other compression forms are used that reduce to total number of colors saved, that challenges the object recognition further.

Also, what you're interested in having is only of value to Labview programmers, so there's not a very large market for such a tool to be sold to - unlike bitmaps of scanned text to ASCII or wordprocessor applications - traditional OCR software.

All this ins't to say it can't be done, but that it's difficult, and for the person or company that undertakes it, the sales potential is limited.

Regards,

Bob Donnell
Message 9 of 10
(4,407 Views)
> I am having a .gif file which consists of vi code. I want to convert
> that .gif file into vi & complile it. I am using LV 6.1 & 7 express.
> Is is possible?
> Reverse is surely possible like we can convert the vi diagram into
> gif/.bmp file? But above i dont know?
>

As others have said, it isn't possible with the tools out there today,
and if it were written, it would be a very lossy tool. It wouldn't be
able to get all of the properties of a LV panel for instance. In many
ways this is equivalent to having a printout of a dialog or VB form and
asking to have it converted into code.

Anyway, this tool doesn't exist, and you should get the VI itself, not a
picture of it.

Greg McKaskle
0 Kudos
Message 10 of 10
(4,407 Views)