http://www.perlmonks.org?node_id=1008815


in reply to Re^2: Best way to parse/evaluate HTML page contents for apparent image size
in thread Best way to parse/evaluate HTML page contents for apparent image size

And my sincere opinion here is that if you want to determine the effective size of an image on the browser screen, there are many factors which influence this.   (And yes, I hadn’t even considered CSS.)   Sure, all these tools exist for getting to the HTML, etc., but that’s only the tip of the question being posed as I read it.   There are so many potentially influencing variables here, apart from the HTML itself, that the objective is at best difficult to answer.   I found the question as-stated to be vague, as in, difficult to ascertain what potential factors were intended to be in-bounds or not.   Getting to the HTML and/or CSS elements in Perl, fortunately, is a technical matter that has been very-well solved by CPAN.

Replies are listed 'Best First'.
Re^4: Best way to parse/evaluate HTML page contents for apparent image size
by Anonymous Monk on Dec 14, 2012 at 22:30 UTC
    I think you misunderstand what the various mechanize tools offer. You are manipulating a browser like Firefox that will offer you access to it's DOM and rendered image sizes... after it has been rendered, after all the CSS rules have been applied, and various directives like "px" or "%" values of the images have been applied.