![]() |
Obtaining Width and Height for an Image
I am having a problem here. I have an ASP page which
displays different images according to the querystring and the images are all of different sizes. However, in some browsers the image overlaps with the text next to it occasionally. I guess by specifying the "width" and "height" of the image in the HTML should solve the problem. However, I do not want to store the width and height of each image in the database. (There are too many of them!) Is there any function I can use in my ASP page to obtain the width and height of an image? Any help would be very much appreciated! |
Re: Obtaining Width and Height for an Image
Determining Image Properties through ASP by Mike Shaffer - 5/3/2000
http://www.4guysfromrolla.com/webtech/050300-1.shtml Best regards, J. Paul Schmidt, Freelance ASP Web Developer http://www.Bullschmidt.com ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool... *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Re: Obtaining Width and Height for an Image
> I guess by specifying the "width" and "height" of the
> image in the HTML should solve the problem. However, I do > not want to store the width and height of each image in > the database. (There are too many of them!) Is there any > function I can use in my ASP page to obtain the width and > height of an image? Well, if you use a script to store these elements in your database *once*, you will avoid (at the cost of 8 bytes per row). I would seriously consider storing the data in the database, rather than using that processing *every* time you load the image. See the bottom half of http://www.aspfaq.com/2170 |
Re: Obtaining Width and Height for an Image
I've used a little DLL called 'BitmapLibrary' to do this and it works a
treat. http://www.internext.co.za/stefan/bitmapsize/ Chris. "Sharlet" <nospam@please> wrote in message news:0caf01c35cba$2ea47c70$a101280a@phx.gbl... I am having a problem here. I have an ASP page which displays different images according to the querystring and the images are all of different sizes. However, in some browsers the image overlaps with the text next to it occasionally. I guess by specifying the "width" and "height" of the image in the HTML should solve the problem. However, I do not want to store the width and height of each image in the database. (There are too many of them!) Is there any function I can use in my ASP page to obtain the width and height of an image? Any help would be very much appreciated! |
Obtaining Width and Height for an Image
Thanks all for your suggestions. You learn something new
every day. I thought there might be an easier solution such as a built-in function to do that. I guess in that case I'd better put them all in the database. (*sign*) |
Re: Obtaining Width and Height for an Image
Why not code it so that it updates the database itself the first time you
request an image? Best of both worlds! Add new images to your hearts content and just watch the database populate itself as the web runs. Chris. "Sharlet" <nospam@please> wrote in message news:082d01c35d94$21089760$a401280a@phx.gbl... Thanks all for your suggestions. You learn something new every day. I thought there might be an easier solution such as a built-in function to do that. I guess in that case I'd better put them all in the database. (*sign*) |
| All times are GMT. The time now is 08:25 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.