But, as with most things webbish, many programs and/or people ignore those standards, posting html like this:
<img src="/graphics/foo.jpg">Your introductory line, "...parsing an image's size from a URL (not local path)" implies something very different than what jhourcle (above) discusses. That node may reflect your intent more precisely, but if I take your quoted remark litterally, I don't think it can be done because there's no info about the size(s) of any contained image(s) in a URL itself.
However, getting sizes from properly formatted <img...> tags at a URL is readily do-able if the code at the address in question actually includes the requisite info.
The only ready alternative (that I see but Nota Bene: jhourcle 's above) for sites using non-compliant image tags is to feed your program with full_paths_to_images (by name) and pipe the images to a graphics package or program such as ImageMagick or the gimp. (For that, you may want to search here re Tk + image or gtk + image, where you may find help -- pay special attention to anything Zentara wrote).
You may wish to start with Corion's notes here or -- if you need background on images especially note Merlyn's and thpfft's replies to the referenced node.
FOOTNOTE, UPDATE With considerable chagrin, I note that even as I toiled over this largely wasted observation, Brother jhourcle correctly ( inferred||intuited||leapt to the correct conclusion ); namely, that your question referred to the module Image::Size. IMO, it would have been nice to mention that explicitly in the OP.
In reply to Re: determining image size by a URL
by ww
in thread determining image size by a URL
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |