This is a discussion on How to get dimensions of the image in C# DOT NET 2005? within the C# Programming forums, part of the Software Development category; How to get dimensions of the image in C# DOT NET 2005?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi Archer... Using the below code, one can easily get the dimensions of the image from a specified path. FileStream fs = new FileStream (path, FileMode.Open, FileAccess.Read, FileShare.Read); using (System.Drawing.Image image = System.Drawing.Image.FromStream (fs)) { int fileLength = Convert.ToInt32 (fs.Length); fileWidth = image.Width; fileHeight = image.Height; } fs.Close(); fs = null; |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SQL Server 2005 | kingmaker | Database Support | 100 | 03-22-2008 02:08 AM |
| Convert image to other image format using CODEC in .NET 3.0 | Mramesh | C# Programming | 0 | 02-07-2008 03:33 AM |
| How to create an image from panel background Image | S.Vinothkumar | C# Programming | 1 | 10-22-2007 03:52 AM |
| Threading in C# .Net 2005 : | a.deeban | C# Programming | 53 | 09-10-2007 07:27 AM |
| I Cannot access SQL 2005 integrated services after installing SQL-2005..? | theone | Database Support | 1 | 07-27-2007 01:12 AM |