Read the width and height of an image

S

Stilts

Hi

Working in asp (not asp.net) I need to read the width and height of an
image before they are displayed on the page.

I have a folder full of images that are dynamically put on a page and I
need to read if they are landscape or protrait.

Any help much appreciated.

:)
 
E

Evertjan.

Slim wrote on 06 apr 2006 in microsoft.public.inetserver.asp.general:
[please do not toppost on usenet]
I don't thing you can server side.

you may need to do so client side

PHP can (sorry OT):

getimagesize()
 
E

Evertjan.

Stilts wrote on 06 apr 2006 in microsoft.public.inetserver.asp.general:
There must be a way for the web code to read the image in a folder??

Please quote what you are replying to. If you want to post a followup via
groups.google.com, don't use the "Reply" link at the bottom of the article.
Click on "show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
<http://www.safalra.com/special/googlegroupsreply/>
 
S

Stilts

Justin said:
ImageMagick comes with a COM object that can do this.

' = Function: Dimensions =
' Use an instance of the ImageMagickObject to determine the width and
' height of an image.
'
' Arguments:
' im - An instance of the ImageMagickObject.
' src - The name of the source file.
'
' Returns:
' An array containing the width and height as elements 0 and 1,
' respectively.
Function Dimensions(im, src)
Dim msgs
msgs = im.Identify("-format", "%w,%h", src)
Dimensions = Split(msgs)
End Function

You can find it at http://www.imagemagick.org/.

Sorry but I'm not sure about above. I gather there's no standard asp
version like phps getimagesize()???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top