473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Read the width and height of an image

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.

:)

Apr 6 '06 #1
9 3466
I don't thing you can server side.

you may need to do so client side

"Stilts" <st*****@hotmail.co.uk> wrote in message
news:11*********************@v46g2000cwv.googlegro ups.com...
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.

:)

Apr 6 '06 #2
There must be a way for the web code to read the image in a folder??

Help!

Apr 6 '06 #3
Slim wrote on 06 apr 2006 in microsoft.public.inetserver.asp.general:
"Stilts" <st*****@hotmail.co.uk> wrote in message
news:11*********************@v46g2000cwv.googlegro ups.com...
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.

[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()

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Apr 6 '06 #4
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/>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Apr 6 '06 #5
On Thu, 06 Apr 2006 09:03:46 -0500, Stilts <st*****@hotmail.co.uk> wrote:
Working in asp (not asp.net) I need to read the width and height of an
image before they are displayed on the page.


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/.

--
Justin Piper
Bizco Technologies
http://www.bizco.com/
Apr 6 '06 #6

Justin Piper wrote:
On Thu, 06 Apr 2006 09:03:46 -0500, Stilts <st*****@hotmail.co.uk> wrote:
Working in asp (not asp.net) I need to read the width and height of an
image before they are displayed on the page.


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/.

--
Justin Piper
Bizco Technologies
http://www.bizco.com/


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

Apr 6 '06 #7
On Thu, 06 Apr 2006 10:42:06 -0500, Stilts <st*****@hotmail.co.uk> wrote:

Justin Piper wrote:
On Thu, 06 Apr 2006 09:03:46 -0500, Stilts <st*****@hotmail.co.uk>
wrote:
> Working in asp (not asp.net) I need to read the width and height of an
> image before they are displayed on the page.


ImageMagick comes with a COM object that can do this.


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


Nothing I'm aware of, sorry.

--
Justin Piper
Bizco Technologies
http://www.bizco.com/
Apr 6 '06 #8
http://www.planet-source-code.com/vb...txtCodeId=6629
"Stilts" <st*****@hotmail.co.uk> wrote in message
news:11*********************@v46g2000cwv.googlegro ups.com...
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.

:)

Apr 6 '06 #9
Thanks Kyle, much appreciated :)

Apr 7 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alex Shi | last post by:
In php, is there a way obtain the width of a charactor of a certain font? Alex -- ================================================== Cell Phone Batteries at 30-50%+ off retail prices!...
0
by: prakash | last post by:
Dear Friends I am new guy to Visual C++.NET I've program to save website as a image vc++.net . It have a function "SaveSnapshot" to save the webpage as an image On that function ifor saving...
2
by: Robson Carvalho Machado | last post by:
Dear friends, I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an 1px transparent image only to determine link position, but as I create this link dynamically I could not...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
1
by: comp.lang.php | last post by:
Sorry folks, I'm on a roll!!! I need to calculate the height or width of an image if you change either the width or height and don't change BOTH of them at the same time, this is to "vector" the...
8
by: Kentor | last post by:
Hello, I have users that submit images to my website. By default I choose to make the width bigger than the height because usually pictures are taken horizontally... But in some cases people take...
2
by: Atul | last post by:
I am unable to find image height and width in mozilla firefox. My code is working in IE but not in Mozilla. How can i find image width and height in mozilla? function check(sel) { if(sel != "")...
1
epots9
by: epots9 | last post by:
I have a image inside of a div <div id="image"> <div id="loader"> <img id="loaderImage" src="assets/loader.gif" alt="loading..." /> </div> <div id="loaded"> <img id="picture" src="" alt=""...
2
by: devnew | last post by:
hi i am new to python and PIL and was trying to write a class to read and write RGB color model jpeg images.. i came up with this class below..i want to know if this is the way to read/write the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.