Jump to content
Sign in to follow this  
gruntydatsun

Get Image Size In Bytes Of Image In Webpage

Recommended Posts

gruntydatsun

I need to get the image size, in bytes, of an image that is part of a webpage. The image is a standard gif.

I tried the DOM image object doesn't seem to have a property I can easily reference.

Does anyone know an easy way.... or failing that a hard way?

Share this post


Link to post
Share on other sites
gruntydatsun

Get image URL from page, then use InetGetSize() ?

Nice. Thanks Rarst

Heres the code for people coming later...

$oImg = _IEImgGetCollection ($oIE, 3)

$sInfo = "Src: " & $oImg.src

$size = InetGetSize($oImg.src)

The three at the end of the first line means the 4th image on the page.

Edited by gruntydatsun

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.