Thank you.
With some help I was able to come up with the following ...
private void Page_Load(object sender, System.EventArgs e)
{
imgTest2.ImageUrl = @"d:\Client\tlacsharp\private\3\large\01.jpg" ;
Bitmap myBitmap = new Bitmap( imgTest2.ImageUrl );
txtTest2.Text = myBitmap.Height + " x " + myBitmap.Width ;
}
... where there is simply a Text Box for reporting and an image with no
dimensions specified.
The reason I want this is because I want to cycle through all the images in
a directory and find the dimensions of the largest one. I can then reserve
space for the largest one on the page and cycle all the images through that
reserved space.
--
-- Thom Little --
www.tlaNET.net -- Thom Little Associates, Ltd.
--
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2***************@TK2MSFTNGP11.phx.gbl...
Thom,
In order to do this, you will have to load the image on the server
side. Once you do that, you can place the height and width properties in the IMG
tag, which will (I think) cause the browser to reserve space for that
image before it is downloaded (since it knows the dimensions already).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Thom Little" <th**@tlanet.net> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl... I would like to dynamically add a .jpg image of arbitrary size to an
..aspx page and reserve the space for the image before it is loaded. Loading
the image is no problem. How can I determine the height and width of the
image before it is loaded? Is there an article that you can point me to on
the subject?
--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--