471,854 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How to get the image size?

ι
How to get the image size with VBScript in ASP?
Jul 19 '05 #1
7 8756
What type of image is it, gif, jpg, png etc etc!!!

Details my man, Details!!! :)
-----Original Message-----
How to get the image size with VBScript in ASP?
.

Jul 19 '05 #2
You can use the GetFileDimensions method of Shotgraph component:
http://www.shotgraph.com
It returns both image type and dimensions.

Best regards,
Mikhail.
<de*********@126.com> wrote in message
news:O0**************@TK2MSFTNGP09.phx.gbl...
How to get the image size with VBScript in ASP?

Jul 19 '05 #3
This is a subject that's come up many many times in the various asp
newsgroups. Take a look here, as well:

http://www.aspfaq.com/show.asp?id=2170
"ι" <de*********@126.com> wrote in message
news:O0**************@TK2MSFTNGP09.phx.gbl...
How to get the image size with VBScript in ASP?

Jul 19 '05 #4
"Mortis the Rigger" wrote:
: What type of image is it, gif, jpg, png etc etc!!!
:
: Details my man, Details!!! :)

*snicker*
Jul 19 '05 #5
"ι" write:
: How to get the image size with VBScript in ASP?

1. Define 'image size'. Do you want width and height or file size?
2. Do you want this from the local drive, i.e. with ASP Upload prior to
upload, or do you want it from an image on the server?

I can get the file size, width, and height either from local or server
without components and without using FSO.
Please advise.

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.
-Technet Knowledge Base-
http://support.microsoft.com/default...&ln=EN-US&FR=0
-Technet Script Center-
http://www.microsoft.com/technet/tre...er/default.asp
-MSDN Library-
http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #6

"Roland Hall" <nobody@nowhere> wrote in message
news:eF**************@tk2msftngp13.phx.gbl...
I can get the file size, width, and height either from local or server
without components and without using FSO.


How do you manage that then? I would have assumed you'd need to use the FSO
to get information about a file.

Jul 19 '05 #7
"Dan Boylett" wrote:
: "Roland Hall" <nobody@nowhere> wrote in message
: news:eF**************@tk2msftngp13.phx.gbl...
:
: > I can get the file size, width, and height either from local or server
: > without components and without using FSO.
:
: How do you manage that then? I would have assumed you'd need to use the
FSO
: to get information about a file.

On the server-side you do if it is not an image file. If it is an image
file you can create a new image and set the src to your image file. You
then can use fileSize but there is an issue. When I do it quickly, it
displays -1 for fileSize. If I introduce a delay, it works.

This is one I wrote that allows you to check the file size and image size
(width/height) before you upload. It has a flaw because it will not clear
the file upload text if the file fails validation so I'm using an
alternative method for submitting the form with valid files. I got a
response from HikksNotAtHome about using a dummy form but I have not put in
his method with this code yet.

This is the link for the client-side code:
http://kiddanger.com/lab/iupload.asp

This is the link of the other discussion:
http://groups.google.com/groups?hl=e...phx.gbl#link18
Jul 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Ruby Tuesday | last post: by
3 posts views Thread by dave | last post: by
4 posts views Thread by no-spam | last post: by
8 posts views Thread by Chris Dewin | last post: by
1 post views Thread by John Thompson | last post: by
6 posts views Thread by nichughes | last post: by
3 posts views Thread by =?Utf-8?B?SlIx?= | last post: by
2 posts views Thread by Adam Teale | last post: by
NeoPa
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by

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.