Wrox Programmer Forums
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 9th, 2005, 04:03 AM
Authorized User
Join Date: Mar 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Olaf_l
Default Image size?

Hai There,

I have a little question. How do i get the width and height of a picture?

I need it for a page, where i want to show a picture. If the width is larger than 400 px, the imagetag should be <img width=400>. For smaller pics, the original width should be used for better pics


Old May 9th, 2005, 05:56 AM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

You can read the image into the image class found in the System.Drawing namespace. That class has methods/properties with all kinds of information.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Get image size without loading? tal Javascript How-To 3 June 30th, 2007 07:05 AM
set up image size goldenstate BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 4 February 15th, 2007 07:37 PM
Image Size kilika Classic ASP Basics 2 July 18th, 2003 01:05 PM
Image size kilika Classic ASP Professional 3 July 16th, 2003 09:26 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.