I want to get an extension (or HTTP headers received) and base64-encoded (seems like JS doesn't have a built-in encoding function, so "binary" would be ok too) body of an image on a page. How can I do it?
This probably seems to be a weird action, but I really need to do it this way: I have a browser object and want to get such data from the last loaded page. The driver supports executing JS in the context of the current page so I think it is probably the best solution.
Update:
See, I already have a page with all the images on it and I don't want to request any of them again. I want to get the data string (like "GIF89a��÷–�Òíÿ…™ë�•懚í~’âÔîÿ}‘à‡�¤ÇãÿÓÕ䊜ë
) of a certain image.