473,322 Members | 1,401 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,322 software developers and data experts.

how to find the size of image

how to find the size of image in asp.net

Aug 20 '06 #1
3 1534
The Image class has both Height and Width properties. Read the documentation
here:
http://msdn2.microsoft.com/en-us/lib...roperties.aspx
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"de*********@rediffmail.com" wrote:
how to find the size of image in asp.net

Aug 21 '06 #2
Peter Bromberg wrote:
The Image class has both Height and Width properties. Read the documentation
here:
http://msdn2.microsoft.com/en-us/lib...roperties.aspx
Peter
BTW, if you're doing this in ASP.NET, it might be a good idea to
pre-scan all your images and cache the width and height somewhere. That
way you won't have to load up and decode images for every request.

-- Barry

--
http://barrkel.blogspot.com/
Aug 21 '06 #3

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message
news:2F**********************************@microsof t.com...
| The Image class has both Height and Width properties. Read the
documentation
| here:
|
http://msdn2.microsoft.com/en-us/lib...roperties.aspx
| Peter
| --
| Co-founder, Eggheadcafe.com developer portal:
| http://www.eggheadcafe.com
| UnBlog:
| http://petesbloggerama.blogspot.com
|
|
|
|
| "de*********@rediffmail.com" wrote:
|
| how to find the size of image in asp.net
| >
| >

Peter,

Did you notice the following Caution in
http://msdn2.microsoft.com/en-us/library/xs6ftd89.aspx

Classes within the System.Drawing namespace are not supported for use within
a Windows or ASP.NET service. Attempting to use these classes from within
one of these application types may produce unexpected problems, such as
diminished service performance and run-time exceptions.

I would say - don't use this namespace in ASP.NET or any non UI application
(services), it will break sooner than later. Some classes need an pumping
message loop, furthermore you introduce GDI+ into a background process (a
bunch of native code with it's own native thread).

Willy.


Aug 21 '06 #4

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

Similar topics

9
by: Deepa | last post by:
Hi All, I'm facing problem displaying image of size 5000X5000 .My window size is smaller than image size so i'm not able to see the complete image.i can use scroll bars to view the image but i...
4
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...
25
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
3
by: Andy Baxter | last post by:
Is there a way in javascript to find out the size of an image you've just preloaded? I have the following object: function tourImage(imgName) { // used for passing image details to a...
3
by: Saber | last post by:
There are some Images (System.Drawing.Image) with same widths and heights, I want to find if 2 images are equal. How can I do it? The following code always returns false: If ...
1
by: deepthy_raj | last post by:
I have added some image in aspx page like this <asp:image id="image1" runat="server" imageurl="C:/Images/Picture.jpg" Now i want to find the size of image .I also want the name of image.I have...
2
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:...
9
by: shailajaAdiga | last post by:
Hi All.. images are stored in database(imagecontent and image type is stored).Currently i have displayed the image in popup window (no size limits to window). I would like to get the image size...
1
by: RYKLOU | last post by:
I am kinda new to php, but i do know what i am doing kinda, but i came across this error when i am trying to upload a file to my website. Fatal error: Allowed memory size of 8388608 bytes...
2
by: everly | last post by:
Hi, I'm helping my friends band and making their MySpace. I messed something up and I can't figure out what it is. Everything is all out of whack on the bottom half of the page. The comments...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.