Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 07:27 AM
Sharlet
Guest
 
Posts: n/a
Default 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!

  #2  
Old July 19th, 2005, 07:27 AM
Bullschmidt
Guest
 
Posts: n/a
Default 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!
  #3  
Old July 19th, 2005, 07:28 AM
Aaron Bertrand - MVP
Guest
 
Posts: n/a
Default Re: Obtaining Width and Height for an Image

> I guess by specifying the "width" and "height" of the[color=blue]
> 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?[/color]

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


  #4  
Old July 19th, 2005, 07:28 AM
Chris Barber
Guest
 
Posts: n/a
Default 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!


  #5  
Old July 19th, 2005, 07:29 AM
Sharlet
Guest
 
Posts: n/a
Default 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*)
  #6  
Old July 19th, 2005, 07:30 AM
Chris Barber
Guest
 
Posts: n/a
Default 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*)


 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles