LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

extract image out of embedded webpage

Hello there!!!

I've read some threads but there are only solutions for getting the HTML code.

The thing I want to do is:

1. Download a webpage :: can I do
2. parse the webpage :: can I do
3. extract a picture to manipulate it with the the Labview functions :: don't know how

I've tried it with AcitveX _ SHDocVw.IWebBrowser2 and Image.
I can get some properties but not the picture itselfe.

4. Control some radiobuttons, Buttons and Inputs:: Maybe with references of the activeX elements?

I've read some threads, but only could find solutions for getting the HTML code.
Maybe someone could help me.

So thanks for your time....

Bernhard
0 Kudos
Message 1 of 6
(5,153 Views)
Hello Bernhard.

I think I can help you with extracting a picture.
You've mentioned that you can already download a web page and browse it's code. So you can easily find the required picture in it. (Well at least you should know the name of it. If you don't then you'll have need to load of them).
For example you know that images name is Picture1 (some code from HTML page: src="Your Downloaded Web Page.files/Picture1.jpg"). You also know that images from one page are stored at the separate directory. Then you can easily load them using eihter Picture Toolkit or NI-IMAQ toolkit. (The latter is much better but costs a lot.)
See attached image.

www.xinstruments.com - Custom Software for Industrial Automation

www.hdrconverter.com - Picture processing made easy

0 Kudos
Message 2 of 6
(5,139 Views)
Thanks for answering at first!

But sorry, my fault!

I ment download the Sourcecode, not the wepage.
But this would be also a solution, if I could save/download the whole Page.

Isn't there a posibility to download a picture if I know the Adress?

Bernhard
0 Kudos
Message 3 of 6
(5,118 Views)
Bernhard;

There is this technique using DataSockets:

How to Display an Image from the Web in LabVIEW

Regards;
Enrique
www.vartortech.com
0 Kudos
Message 4 of 6
(5,113 Views)
Thanks a lot!

This solves the Image problem!

Thanks a lot!

Now the tricky (for me tricky) problem:
Is it possible to control the embedded contols on a page?
If there is no possibility to get some handles for them,
I'll try it with controlling the mouse to control the controls. 😉

Bernhard
0 Kudos
Message 5 of 6
(5,110 Views)
Bernhard,

If you know what the tab order will be on the HTML page in question, then you can use Windows Scripting to interact with form elements pretty easily.

Attached is an example (LV 7.0), modified from another one posted here on the NI site. This example loads up the NI home page and does a search for "scripting" in the Support section of the site using the search form at the top of the page.

Another idea might be to use a third-party scripting tool such as AutoIt. I'm not sure if it gives you finer control of elements within the HTML page or not, but you could check it out.

Regards,
John
0 Kudos
Message 6 of 6
(5,091 Views)