LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I extract an image from the web browser

Hi, I'm doing something similar to the vi found on this page.
 
 
This vi extracts the source HTML from a web page which is in a container.  The difference with my application is that I'm trying to extract an image from the web browser.  Does anyone have any thoughts as to how this could get done? 
0 Kudos
Message 1 of 4
(4,178 Views)
I wouldn't bother with the ActiveX thing.

1... If you know the URL of the image, go to step 3.

2... Open a TCP/IP connection, send the HTTP request for the HTML page, and store the resulting HTML in memory, and parse it to find the image URL you want.

3... Send an HTTP request for the image, store the image as a disk file, and use READ JPG FILE, or READ PNG FILE to import it. If it's a GIF file, a QuickTime library will help you import it.

I have an example on how to do step 3 if you're interested: http://www.Culverson.com/Public/TerraView.zip

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 4
(4,163 Views)
 
Coastal, Thanks for the input. I'll definately try it your way.  The activex thing is kind of difficult, plus it looks like your application works well.  The only difference is that I'm trying to download a tif file.  It probably won't matter because that file write vi doesn't specify a type.
Thanks again,
Pat
0 Kudos
Message 3 of 4
(4,148 Views)
The HTTP header you get back will probably specify IMG/TIFF, so you should name it with a TIF extension. I think the Quicktime library will import a TIF, although I can't guarantee it, as I haven't tried.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 4
(4,135 Views)