473,778 Members | 1,934 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Information of an image like height, width

How to get the information(lik e height, width) of an
image to be uploaded?
Nov 15 '05 #1
1 2560
Pums,

If you have an instance of a class that derives from the Image class,
you can use the Height and Width properties of that instance to get the
height and width. You mentioned "upload". I assume you are uploading
images to an ASP.NET application. In this case, you have to upload the
image. From the uploaded bytes, you can get an Image by calling the static
FromStream method on the Image class, using a MemoryStream instance to wrap
the bytes. Once you have the instance, use the Height and Width properties
as you wish.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Pums" <an*******@disc ussions.microso ft.com> wrote in message
news:07******** *************** *****@phx.gbl.. .
How to get the information(lik e height, width) of an
image to be uploaded?

Nov 15 '05 #2

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

Similar topics

2
4189
by: Tjerk | last post by:
Hello all, I have the script below to change an image depending on the date upto january it worked fine but then it just stopped working does anybody have an idea how I can make it work again or why it doesn't work? Thanks in advance Tjerk
9
2048
by: Karl Burrows | last post by:
I am working on a Website for a non-profit group and for some reason I have one link that doesn't want to cooperate. All the image links work fine with the onmouseover and onmouseout script except one. Maybe I am just getting blurry-eyed, but can someone help me figure out what I have done wrong? Thanks!!!! <td width="190" height="57"><a href="Trends.htm" onmouseover="chgImg('Trends','InteriorTrendsBold')"...
5
2148
by: Csaba Gabor | last post by:
Is there any way to determine the pixel height and width of an original image? Specifically, If I have <IMG id=myImg src="pic.jpg" height=200 width=300> can I figure out what the original size of pic.jpg is (had I not placed the height and width attributes on the image, whether in the original tag or later via javascript)?
6
24190
by: abdullah1983 | last post by:
Hi Guys, I need some clarification regarding the problem with safari browser. Please find my code below. I'm setting the image src, mouseover and mouseout using javascript. The mouseover and mouseout are working perfect but only the source is not setting using java script. Please clarify me regarding this. PS: This problem is only for safari browser. <tr>
4
2756
by: tshad | last post by:
I am trying to set up an Image authorization where you type in the value that is in a picture to log on to our site. I found a program that is supposed to do it, but it doesn't seem to work. It should put a blue and yellow box on the page with "This is a test" as part of the picture. But what I get is a broken Gif. The other problem is that I can't view the source???? The view source is disabled for this page. What causes this?
1
1661
by: sgately | last post by:
HI All, I am not an HTML programmer, just used a template to create my website. On the website it had a built in Contact Form quickmail option. I do not know how to have information forwared to my Godady email account when the visitor cliencs send. My site, or the page in reference is here: http://www.valleywidehypnosis.com/Contact%20Page.htm I am hoping someone can help me with what I need to do to get information forwarded to me ...
22
2045
by: dfm | last post by:
Hi, I cant change the header to display images from a database. It's giving me this error : Warning: Cannot modify header information - headers already sent by (output started at /home/content/d/f/m/dfmcons/html/secwhouse/index.php:18) in /home/content/d/f/m/dfmcons/html/secwhouse/index.php on line 71 Here is the code : <? mysql_connect("$host","$username", "$password"); mysql_select_db("secwhouse"); ?>
1
2036
by: sravani1 | last post by:
This code runs like when i submit the form it takes the image and displayed and top of the image a map will displayed. But actually i want that when i give the image it checks the location in the map and after displayed it.plz tell that how to start the logic. <?php // Connect to database $errmsg = "";if (! @mysql_connect("localhost","root","sreeni")) { $errmsg = "Cannot connect to database"; } @mysql_select_db("my_db1");...
2
4095
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 is occuring in imagerow2 div on line 56. please see my code below here is my html <!DOCTYPE...
0
9465
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10127
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10068
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8954
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7474
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
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

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.