Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Image not resized to browser window

Reply
Thread Tools

Image not resized to browser window

 
 
Don
Guest
Posts: n/a
 
      10-21-2006
How do I make a large image be resized so it all fits in the browser
window? I've found I.E.'s "Enable Automatic Image Resizing" setting
works if the image is opened via a link directly to the picture. Or, if
the image is opened in the browser with "File, Open".

However, if the image is CONTAINED WITHIN its own HTML page, with "<img
src" tag, it does not work!! Is this just me? Very simply, if I have a
page:

<html>
<head>
<title>IMG_1981</title>
</head>
<body>
<img src="IMG_1981.jpg">
</body>
</html>

then image resizing does NOT work! How can I get resizing to work in
this page? I do NOT want to specify any particular size, rather I want
the image to be resized to be fully contained in the browser window,
however big the window is.

Many thanks in advance!
 
Reply With Quote
 
 
 
 
mbstevens
Guest
Posts: n/a
 
      10-21-2006
Don wrote:
> How do I make a large image be resized so it all fits in the browser
> window? I've found I.E.'s "Enable Automatic Image Resizing" setting
> works if the image is opened via a link directly to the picture. Or, if
> the image is opened in the browser with "File, Open".
>
> However, if the image is CONTAINED WITHIN its own HTML page, with "<img
> src" tag, it does not work!! Is this just me? Very simply, if I have a
> page:
>
> <html>
> <head>
> <title>IMG_1981</title>
> </head>
> <body>
> <img src="IMG_1981.jpg">
> </body>
> </html>
>
> then image resizing does NOT work! How can I get resizing to work in
> this page? I do NOT want to specify any particular size,


....bad idea...

> rather I want
> the image to be resized to be fully contained in the browser window,
> however big the window is.
>
> Many thanks in advance!


You make the image the size it should be in
your imaging software (Gimp, Photoshop,
etc.). There are drawbacks to allowing
browsers to resize images.
--
mbstevens
http://www.mbstevens.com/howtothumb
 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      10-21-2006
In article <(E-Mail Removed)>,
Don <(E-Mail Removed)> wrote:

> How do I make a large image be resized so it all fits in the browser
> window? I've found I.E.'s "Enable Automatic Image Resizing" setting
> works if the image is opened via a link directly to the picture. Or, if
> the image is opened in the browser with "File, Open".
>
> However, if the image is CONTAINED WITHIN its own HTML page, with "<img
> src" tag, it does not work!! Is this just me? Very simply, if I have a
> page:
>
> <html>
> <head>
> <title>IMG_1981</title>
> </head>
> <body>
> <img src="IMG_1981.jpg">
> </body>
> </html>
>
> then image resizing does NOT work! How can I get resizing to work in
> this page? I do NOT want to specify any particular size, rather I want
> the image to be resized to be fully contained in the browser window,
> however big the window is.
>
> Many thanks in advance!


Try this and tell me if it works:

<html>
<head>
<title>IMG_1981</title>
</head>
<body>
<img style="width:100%;" src="IMG_1981.jpg">
</body>
</html>

(I assume landscape and width is most important dim)

--
dorayme
 
Reply With Quote
 
Don
Guest
Posts: n/a
 
      10-21-2006
dorayme wrote:
>
> In article <(E-Mail Removed)>,
> Don <(E-Mail Removed)> wrote:
>
> > How do I make a large image be resized so it all fits in the browser
> > window? I've found I.E.'s "Enable Automatic Image Resizing" setting
> > works if the image is opened via a link directly to the picture. Or, if
> > the image is opened in the browser with "File, Open".
> >
> > However, if the image is CONTAINED WITHIN its own HTML page, with "<img
> > src" tag, it does not work!! Is this just me? Very simply, if I have a
> > page:
> >
> > <html>
> > <head>
> > <title>IMG_1981</title>
> > </head>
> > <body>
> > <img src="IMG_1981.jpg">
> > </body>
> > </html>
> >
> > then image resizing does NOT work! How can I get resizing to work in
> > this page? I do NOT want to specify any particular size, rather I want
> > the image to be resized to be fully contained in the browser window,
> > however big the window is.
> >
> > Many thanks in advance!

>
> Try this and tell me if it works:
>
> <html>
> <head>
> <title>IMG_1981</title>
> </head>
> <body>
> <img style="width:100%;" src="IMG_1981.jpg">
> </body>
> </html>
>
> (I assume landscape and width is most important dim)
>
> --
> dorayme



It works! You are golden, many thanks!!
 
Reply With Quote
 
Don
Guest
Posts: n/a
 
      10-21-2006


mbstevens wrote:
>
> Don wrote:
> > How do I make a large image be resized so it all fits in the browser
> > window? I've found I.E.'s "Enable Automatic Image Resizing" setting
> > works if the image is opened via a link directly to the picture. Or, if
> > the image is opened in the browser with "File, Open".
> >
> > However, if the image is CONTAINED WITHIN its own HTML page, with "<img
> > src" tag, it does not work!! Is this just me? Very simply, if I have a
> > page:
> >
> > <html>
> > <head>
> > <title>IMG_1981</title>
> > </head>
> > <body>
> > <img src="IMG_1981.jpg">
> > </body>
> > </html>
> >
> > then image resizing does NOT work! How can I get resizing to work in
> > this page? I do NOT want to specify any particular size,

>
> ...bad idea...
>
> > rather I want
> > the image to be resized to be fully contained in the browser window,
> > however big the window is.
> >
> > Many thanks in advance!

>
> You make the image the size it should be in
> your imaging software (Gimp, Photoshop,
> etc.). There are drawbacks to allowing
> browsers to resize images.
> --
> mbstevens
> http://www.mbstevens.com/howtothumb


And the drawbacks are...? Why do you say this? Here's my motivation:
I made a 'home' page with links to pages containing the images. Each of
the image pages contain 'next', 'previous' buttons so it can function as
a slide show, which is why I can't make the home page link directly to
the pictures. I want to put all this on a CD to give to friends, but I
want to include the FULL resolution images in case they want to make
large prints, which is why I don't want to set any particular image
size. ALSO, the images will appear full-screen (IE maximized) for
whatever display resolution they have.
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      10-21-2006
In article <(E-Mail Removed)>,
Don <(E-Mail Removed)> wrote:

> > You make the image the size it should be in
> > your imaging software (Gimp, Photoshop,
> > etc.). There are drawbacks to allowing
> > browsers to resize images.
> > --
> > mbstevens
> > http://www.mbstevens.com/howtothumb

>
> And the drawbacks are...?


One of them is that the resizing algorithms of browsers (which
have to work quickly) have not generally been as good as those in
good image manipulation programs (like Photoshop).

Another is that pics generally look shithouse when upped up from
their natural size (the size they are saved in) and you can't
know how big someone's screen might be.

But if you know these limitations and you judge there are overall
benefits, I can't condemn you. And that is what is most
important. What I think.

(All of today I have been either suffering or enjoying
particularly strong illusions of grandeur)

--
dorayme
 
Reply With Quote
 
mbstevens
Guest
Posts: n/a
 
      10-21-2006
Don wrote:

>
> And the drawbacks are...? Why do you say this? Here's my motivation:
> I made a 'home' page with links to pages containing the images. Each of
> the image pages contain 'next', 'previous' buttons so it can function as
> a slide show, which is why I can't make the home page link directly to
> the pictures. I want to put all this on a CD to give to friends,


If it will never appear on the net, letting
the browser resize is not quite so bad, but I
still would not do it unless you are also
sure that everyone you distribute the CDs to
also have a browser that resizes images in a
way that looks good and that maintains the
aspect ratio.

> but I
> want to include the FULL resolution images in case they want to make
> large prints, which is why I don't want to set any particular image
> size.


I would make a set of images reduced to the
same width and have a printing link to the
full sized image. Your pages will fail
validation without a width and height set.

> ALSO, the images will appear full-screen (IE maximized) for
> whatever display resolution they have.


Not unless they allow their browser windows
to be maximized. Are you playing around with
jscript to maximize their windows without
their permission? That would be a bad idea.
They might have different ideas about how
large their browser windows should be.
Better to make reduced images that are small
enough to display in even a reasonably small
browser window.
--
mbstevens
http://www.mbstevens.com/howtothumb


 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      10-21-2006
In article <(E-Mail Removed)>,
Don <(E-Mail Removed)> wrote:

> And the drawbacks are...?


Another drawback, if you put up big photos then you disadvantage
people who either have very small screens, low bandwidth or who
are happy to see them a reasonable small size. It works like
this: you can put up a massive pic and it will resize by the
browser either with the style I gave you or in other ways (there
are situations when you can base the width and height on ems
according to the px proportions of the native size) not to badly
if it is viewed with less pixels than native. But the big file
still has to be downloaded to the punters machine, the poor
fellow on dialup or small screen is getting more than he wants
for hs purpose.

You can easily solve the problem of giving everyone what they
want by ensuring you offer different sizes and making this plain.
For big files, best to make it clear they can download it for
printing (don't lay it into the page, except for a link to it).
Thumbnails and moderate sizes for enlargements for the average
we\bsite, say 100px square and 500px square as a rough guide.
Anything much bigger, I would take heed of what mb says.

--
dorayme
 
Reply With Quote
 
mbstevens
Guest
Posts: n/a
 
      10-21-2006
dorayme wrote:

> You can easily solve the problem of giving everyone what they
> want by ensuring you offer different sizes and making this plain.
> For big files, best to make it clear they can download it for
> printing (don't lay it into the page, except for a link to it).
> Thumbnails and moderate sizes for enlargements for the average
> we\bsite, say 100px square and 500px square as a rough guide.
> Anything much bigger, I would take heed of what mb says.
>


Also, 'previous' - 'next' links are often
useful for truly serial things like stories
and articles. But if you do not really need
to control the visitor's experience, it would
be better to present thumbnails on a single
page and let the visitor choose which
enlargements s/he wants to see in the order
they want to see them.

For example, there must be thousands of
photographer sites on the net that would be
better off without 'previous' - 'next' links.
It is really irritating to have the
photographer's sequencing forced onto you.
Other kinds of art sites also often try to
herd the visitor. I often give up on even
fine work because I get tired of being forced
into a sequence.




 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      10-21-2006
In article
<eHg_g.16761$(E-Mail Removed) .net>,
mbstevens <(E-Mail Removed)> wrote:

> dorayme wrote:
>
> > You can easily solve the problem of giving everyone what they
> > want by ensuring you offer different sizes and making this plain.
> > For big files, best to make it clear they can download it for
> > printing (don't lay it into the page, except for a link to it).
> > Thumbnails and moderate sizes for enlargements for the average
> > we\bsite, say 100px square and 500px square as a rough guide.
> > Anything much bigger, I would take heed of what mb says.
> >

>
> Also, 'previous' - 'next' links are often
> useful for truly serial things like stories
> and articles. But if you do not really need
> to control the visitor's experience, it would
> be better to present thumbnails on a single
> page and let the visitor choose which
> enlargements s/he wants to see in the order
> they want to see them.
>
> For example, there must be thousands of
> photographer sites on the net that would be
> better off without 'previous' - 'next' links.
> It is really irritating to have the
> photographer's sequencing forced onto you.
> Other kinds of art sites also often try to
> herd the visitor. I often give up on even
> fine work because I get tired of being forced
> into a sequence.


Good point. Photoshop back in version 6 was aware of it and in
their (tables based) photo gallery auto feature generated
thumbnails for the index pages and on each page of the
enlargement was a forward and back button, and an "up" arrow
button to go back to the index pages.

--
dorayme
 
Reply With Quote
 
 
 
Reply

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nwebie : Getting the value of a resized browser window andy.jones@fdtassociates.com Javascript 2 09-11-2006 07:20 AM
Custom control should resize when the browser is resized santel_helvis@sify.com ASP .Net Building Controls 0 11-12-2005 07:30 AM
Drop down menu repositions when I resized browser Despoina Javascript 2 03-25-2005 09:43 PM
Rebinding page after image is resized on server not showing new sized image Earl Teigrob ASP .Net 2 02-20-2004 09:44 PM
Re: resized image in table extends table width to original image width Sean Jorden HTML 1 08-19-2003 08:59 AM



Advertisments