|
There are many ways you can approach this problem to solve.
1. Retrieve the data, loop through to add them in arraylist or somthing like that(you may make an object also before putting in arraylist or so). Dont save the image width/height on DB. When you loop through you can create a Bitmap object (dont remember the exact method something like ImageFromFile..). Now you can use the bmp.Width bmp.Height property on your object (bmp is the Bitmap object)
----------------
I dont suggest this though. If you are creating an e-com solution I suggest you use css for thumbs, and other images. all thumbs should be same size.
You can use css like this:
.imgThumb {width:90px; height:110px;border:0;verttical-align:top;overflow:hidden;}
2. You can use javascript to detect the width/height.
3. You can define your <img> tag like this <img id="img1" runat="server" .....
if you are using asp server control. Then on itemdatabound get the width and height of that image control
|