Accessing images trough IHTMLDocument2
-
Hi, The IHTMLDocument2 interface has the method get_images(), which supposedly returns the images found in the document. But trough that interface I can only access the attributes concerning the images (e.g. height, width, border etc.). So my question can I access the actual image data from somewhere. From IHTMLDocument2 or from some other related interface. I'm developing an ActiveX component which needs to alter images on pages. "There is no reason for any individuals to have a computer in their home". Ken Olson, president and founder of Digital Equipment Corp.
-
Hi, The IHTMLDocument2 interface has the method get_images(), which supposedly returns the images found in the document. But trough that interface I can only access the attributes concerning the images (e.g. height, width, border etc.). So my question can I access the actual image data from somewhere. From IHTMLDocument2 or from some other related interface. I'm developing an ActiveX component which needs to alter images on pages. "There is no reason for any individuals to have a computer in their home". Ken Olson, president and founder of Digital Equipment Corp.
There doesn't seem to be any way of doing this, short of hosting the WebBrowser control (or MSHTML) and handling the markup and rendering yourself, which I'm betting isn't an option. Intead, what about displaying the image in your ActiveX control. That way, it would have exclusive control over the display of the image. MSN Photos used to have a print wizard that worked similar (they probably still do, but they went to strickly subscription-based usability so I can't use it anymore). You could still get certain images on the page by getting their
src
attribute and downloading and displaying in your ActiveX. Just an alternative suggestion.Reminiscent of my younger years...
10 LOAD "SCISSORS" 20 RUN
-
There doesn't seem to be any way of doing this, short of hosting the WebBrowser control (or MSHTML) and handling the markup and rendering yourself, which I'm betting isn't an option. Intead, what about displaying the image in your ActiveX control. That way, it would have exclusive control over the display of the image. MSN Photos used to have a print wizard that worked similar (they probably still do, but they went to strickly subscription-based usability so I can't use it anymore). You could still get certain images on the page by getting their
src
attribute and downloading and displaying in your ActiveX. Just an alternative suggestion.Reminiscent of my younger years...
10 LOAD "SCISSORS" 20 RUN
-
Yep, I was also thinking about, taking the src of the image and then downloading it again and so. Though it is kind of stupid to download the images two times, so I was hoping for an easier solution. But I quess I have to live with this ... Thanx
You don't actually have to download it twice. Use the moniker functions like IE does like
URLDownloadToCacheFile
, which even gives you callback. The file is pulled from the cache based on the browser's cache settings. You can also bind an image to the URL moniker directly, which is how IE / Windows usually handles things. This, agian, should be under the control of the cache settings.Reminiscent of my younger years...
10 LOAD "SCISSORS" 20 RUN
-
You don't actually have to download it twice. Use the moniker functions like IE does like
URLDownloadToCacheFile
, which even gives you callback. The file is pulled from the cache based on the browser's cache settings. You can also bind an image to the URL moniker directly, which is how IE / Windows usually handles things. This, agian, should be under the control of the cache settings.Reminiscent of my younger years...
10 LOAD "SCISSORS" 20 RUN