473,544 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get the image size?

How to get the image size with VBScript in ASP?
Jul 19 '05 #1
7 8997
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 GetFileDimensio ns method of Shotgraph component:
http://www.shotgraph.com
It returns both image type and dimensions.

Best regards,
Mikhail.
<de*********@12 6.com> wrote in message
news:O0******** ******@TK2MSFTN GP09.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*********@12 6.com> wrote in message
news:O0******** ******@TK2MSFTN GP09.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******** ******@tk2msftn gp13.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******** ******@tk2msftn gp13.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2848
by: Ruby Tuesday | last post by:
I have a section(185pixelsx 185pixels) in my web page to display an image that is stored in a directory. Using php, how do you resize so if: the image dimension is smaller(width and height is less than 185pixels), display it in the center of the section if the width OR height is larger than 185pixel, resize them with aspect ratio...
3
11742
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a table in MySQL with the path & filename to the image. I have successfully uploaded and performed an update query on the database, but the problem...
4
16652
by: no-spam | last post by:
Hello, I have an HTML question that I'm not sure can be solved. I want to restrict the maximum size of an inline image. For example, I can force the image to be 200x200 if I do this: <img src=blah.gif width=200 height=200> But, that messes up the aspect ratio, and could size the image larger than it's original size.
8
4792
by: Chris Dewin | last post by:
Hi. I run a website for my band, and the other guys want an image gallery. I'm thinking it would be nice and easy, if we could just upload a jpg into a dir called "gallery/". When the client clicks the "gallery" link, a cgi script could search the gallery/ dir, and create thumbnails of any jpeg images that don't already have a thumbnail...
1
2493
by: John Thompson | last post by:
We're sooo close. When we load the page to upload the image, all of the prms go through except the binary image data. Using SQL server with the data type set to "image". Please help! Thanks- John
6
1972
by: nichughes | last post by:
Hello all, A question relating to http://www.entrust-systems.net/ Just for a change I have run into a problem that seems to be OS specific rather than browser specific - the box image that is acting as a faux border for the main text block shows nasty image effects on the outside when using either Firefox or Konqueror on Suse Linux. This...
3
2486
by: =?Utf-8?B?SlIx?= | last post by:
I would like to add text to an image. I have tried to use DrawString and it works on some images but on others it is very very small. I am pretty sure it has something to do with the size of the image but I have had varying results on multiple images. Is there anyway to make the text a fixed size on the image. Similar to putting a date...
2
4112
by: Adam Teale | last post by:
hey guys Is there a builtin/standard install method in python for retrieving or finding out an image's dimensions? A quick google found me this: http://www.pythonware.com/library/pil/handbook/introduction.htm but it looks like it is something I will need to install - I'd like to be able to pass my script around to people without them...
3
4406
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine when iam using a normal web page... but can't in content page.... Code in Master Page <%@ Master Language="C#" AutoEventWireup="true"...
2
4081
by: studentofknowledge | last post by:
For some unknown reason ie is placing images I have in a div in a weird way. One image is overlapping another but this problem is not occuring in mozilla. I have looked at my code over and over again but cant seem to find out what the problem is. I think this could be fixed with a i.e hack??? please advise the problem of the overlapping image...
0
7414
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weĺll explore What is ONU, What Is Router, ONU & Routerĺs main...
0
7359
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7598
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7699
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5895
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectŚplanning, coding, testing, and deploymentŚwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3400
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3398
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1833
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
651
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.