Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Get the Dimensions of an uploaded Image
Author:
Vimal Lakhera
E-mail:
Click to e-mail author
Website:
http://geocities.com/vimallakhera
Submitted:
9/17/2005
Version:
ASP.NET 1.1
Compatibility:
ASP.NET 1.0, ASP.NET 1.1
Category:
Graphics
Views:
14220
Get the Dimensions of an uploaded Image. Code is in C#. ///
/// This function is used to get the Dimensions of an uploaded Image ///
///
stream object ///
Height and Width of given Image
Declarations:
'none
Code:
public string getImageDimensions(Stream str) { System.Drawing.Image UploadedImage = System.Drawing.Image.FromStream(str); float UploadedImageWidth = UploadedImage.PhysicalDimension.Width; float UploadedImageHeight = UploadedImage.PhysicalDimension.Height; string size= UploadedImageWidth.ToString()+","+UploadedImageHeight.ToString(); return size; }
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement