Creating an image from a URL

yelnic

New member
Joined
Oct 22, 2003
Messages
4
We have a rather bizarre issue here, and I was wondering if anyone had any ideas:

The Windows API exposes the call IExtractImage, which, among other things, can extract a bitmap from a URL link. It works quite nicely, except that it doesnt work in XP. The call is still there, but apparently doesnt supported extracting images from URLs in XP.

Now, XP does create thumbnails from html in Windows Explorer, so I know the functionality is there. The question is: where is it? Where did they hide it? Ive seen one product (html2jpg) that basically does this, but nobody seems to have noticed that this functionality is not available in XP. The reason that this is an issue is that if a server is updated from 2000 to XP, we would lose the ability to create thumbnails on the fly for clients.

Any help would be greatly appreciated
 
You can download the image file directly using the [msdn]System.Net.WebClient[/msdn] class, unless theres some particular need for the API, that is.
 
this converts html to an image?

Im not sure were on the same page. Basically, I need to convert html (googles home page, for instance) to an image. I have no image resource to download. Im looking at System.Net.WebClient, and I dont see any mention of taking a URL and converting into a jpg/bmp/whatever...unless this DownloadData() method is more powerful than it looks. Is there something Im missing there?

Thanks
mike
 
Unfortunately, that uses the IExtractImage call from the Win API. It works perfectly in all versions other than XP. :(

It pulls an image perfectly on my 2000 box, but just leaves a blank on the XP machine.

Somehow, XP is doing this for Windows Explorer, but has hidden the call (or made it unavailable). I have no idea why they did so or where it might be now.


mike
 
The code runs smoothly on Windows XP, yelnic. Steve McMahon developed the application on it and I just tested it. Theres something different with your machine.
 
odd

that is strange if it worked with URLs for you---it only works with images on every XP box here---are you running an unusual setup?
 
Looking for a solution to this as well

Hey, is it possible to use the old shell32.dll file? Before service pack 1 or 2 it did work, so, shouldnt it be possible to register the old dll under another name and use it?

BTW, you can check this out as well:

http://www.nbrandt.com/html-preview-xp-thumbnails.html

it talks about how to revert the setting change. It isnt actully a change in the shell32.dll file itself.

Let me know if you find a solution, and I will do the same.
 
Back
Top