How to show a picture in its original size (no autofit to window)

S

Stefan Mueller

On my webpage I'd like to show several small pictures which people can click
to get the large pictures.

I do that with
<a href="big_picture.gif"><img src="small_picture.gif"></a>

The problem is, that if the browser window is not big enough the big picture
is not shown in its original size. I gets automatically resized so that it
fits to the browser window.
How can I avoid that? I'd like to have scroll bars in the browser window
instead.

Stefan
 
S

Spartanicus

Stefan Mueller said:
On my webpage I'd like to show several small pictures which people can click
to get the large pictures.

I do that with
<a href="big_picture.gif"><img src="small_picture.gif"></a>

The problem is, that if the browser window is not big enough the big picture
is not shown in its original size. I gets automatically resized so that it
fits to the browser window.
How can I avoid that?

Use a proper browser instead of IE, or: Internet options, Advanced,
untick "Enable automatic image resizing".
 
B

Blinky the Shark

Stefan said:
On my webpage I'd like to show several small pictures which people can click
to get the large pictures.

I do that with
<a href="big_picture.gif"><img src="small_picture.gif"></a>

The problem is, that if the browser window is not big enough the big picture
is not shown in its original size. I gets automatically resized so that it
fits to the browser window.
How can I avoid that? I'd like to have scroll bars in the browser window
instead.

Ask the users if you can sit down at their computers and change their
broswer display settings. Expect a lot of travel expenses if you get
permission. :)
 
A

Adrienne Boswell

Gazing into my crystal ball I observed "Stefan Mueller"
On my webpage I'd like to show several small pictures which people can
click to get the large pictures.

I do that with
<a href="big_picture.gif"><img src="small_picture.gif"></a>

The problem is, that if the browser window is not big enough the big
picture is not shown in its original size. I gets automatically
resized so that it fits to the browser window.
How can I avoid that? I'd like to have scroll bars in the browser
window instead.

Stefan

As others have said, this is something the user's browser does. What you
could do, however, is have a note that says something like "To enjoy the
large images in their original size, please disable automatic image
resizing."
 
A

Alan J. Flavell

On my webpage I'd like to show several small pictures which people
can click to get the large pictures.

I do that with
<a href="big_picture.gif"><img src="small_picture.gif"></a>

The problem is, that if the browser window is not big enough the big
picture is not shown in its original size.

As a reader, I don't find that a problem. If and when I want to see
the picture full sized, I tell the browser to do so.
I gets automatically resized so that it fits to the browser window.

That depends on the browser and its settings.
How can I avoid that?

If you (as author) manage to find a way to do that, then I (as reader)
will look for a client-side way to stop you from doing it.
I'd like to have scroll bars in the browser window instead.

Then adjust your own browser accordingly, and leave ours to do what we
prefer them to do.

thanks
 
F

fred.haab

Stefan said:
On my webpage I'd like to show several small pictures which people can click
to get the large pictures.

I do that with
<a href="big_picture.gif"><img src="small_picture.gif"></a>

The problem is, that if the browser window is not big enough the big picture
is not shown in its original size. I gets automatically resized so that it
fits to the browser window.
How can I avoid that? I'd like to have scroll bars in the browser window
instead.

Stefan

I know I'm going to get slaughtered for saying this, as most of the
zealots out there will tell you this is highly inappropriate use for
tables (and they'd be right), but simply slapping the image in a table
will stop the big three (Firefox, IE, and Opera) from scaling the
image.

Now, please take into consideration everything everyone else has
said... you probably shouldn't do this... but the option is there if
you insist.

It's kind of like wearing a seatbelt... you have the option not to wear
one, but it's probably not a wise decision.
 
J

Jonathan N. Little

I know I'm going to get slaughtered for saying this, as most of the
zealots out there will tell you this is highly inappropriate use for
tables (and they'd be right), but simply slapping the image in a table
will stop the big three (Firefox, IE, and Opera) from scaling the
image.

Yes it is improper use of a table, but the 'jump on you' will be that
your statement is flatly false. A table is not constrain an image, even
in quirks mode and old markup

<table>
<tr><td width="200"><img src="500pixel.jpg"></td></tr>
</table>

The table will grow to accommodate the full 500p pixels....

Now, please take into consideration everything everyone else has
said... you probably shouldn't do this... but the option is there if
you insist.

There is now way to really 'force' an image to scale to the browser
window if the user doesn't want to. You could use JavaScript to rescale
image to window but the user could thwart you by disabling JavaScript.
You could use a CSS method

IMG {display: block; width: 100%; }

But the user window may not accommodate the height, if you add
height: 100% you will distort the aspect of the image. And the user can
disable your CSS with a modern web browser.
 
F

fred.haab

Jonathan said:
There is now way to really 'force' an image to scale to the browser
window if the user doesn't want to. You could use JavaScript to rescale
image to window but the user could thwart you by disabling JavaScript.
You could use a CSS method

I think you've got it backwords... the OP absolutely does NOT want the
browser to scale the image, he WANTS scrollbars if the image is too
large.

The big three PC based browsers (IE, Firefox, Opera) will automatically
scale an image to fit the browser window (by default, which can be
disabled). Putting it in a table has the effect, which I tested on all
three, of not scaling the image, so that a large image produced
scrollbars instead of being scaled. That's what the OP wanted.
 
J

Jonathan N. Little

I think you've got it backwords... the OP absolutely does NOT want the
browser to scale the image, he WANTS scrollbars if the image is too
large.

Yes you are correct, but the point still hold true in reverse that as
the designer he cannot force the viewer NOT to resize the image if the
viewer has his browser so set. As the designer you do not have control
over such browser setting on modern browsers.
 
F

fred.haab

Jonathan said:
(e-mail address removed) wrote:

Yes you are correct, but the point still hold true in reverse that as
the designer he cannot force the viewer NOT to resize the image if the
viewer has his browser so set. As the designer you do not have control
over such browser setting on modern browsers.

But my first post just told you how to do it... if you put the image in
a table:

<table><tr><td><img src="whatever.jpg"></td></tr></table>

none of the "big three" PC browsers will resize it.
 
D

dorayme

I think you've got it backwords... the OP absolutely does NOT want the
browser to scale the image, he WANTS scrollbars if the image is too
large.

Yes you are correct, but the point still hold true in reverse that as
the designer he cannot force the viewer NOT to ... etc[/QUOTE]

Even when the fellow who suggested that there is a technical way
to satisfy OP's particular specific requirement, that he was not
advocating it, that he was aware of the possible preaching that
his mere mention of tables in this context might trigger, that
his point was a purely limited technical one, you just could not
resist!

Jonathan, do you wear special html/css clothes, have urns that
swing and smoke to the background of whistles (I actually saw all
this at a Catholic funeral once) or other things, pendants in the
shape of <li> and <div> that glow in a headband perhaps?
 
S

Stefan Mueller

Hello

If I'd like to show an image in its original size or in other words if I'd
like to force the browser to use scroll bars if the image is too big I use
<img width=1500 height=1100 src=""big_picture.gif">
I don't need to use tables. But that's also a cute idea. Thanks for this
hint.

However, my original questing was how to show a big image within <a href
....></a>?
<a href="big_picture.gif"><img src="small_picture.gif"></a>

Here I'm not able to use 'width' and 'height' and unfortunately also no
tables for the big image (big_picture.gif).

Stefan
 
S

Steven Saunderson

However, my original questing was how to show a big image within <a href
...></a>?
<a href="big_picture.gif"><img src="small_picture.gif"></a>

Here I'm not able to use 'width' and 'height' and unfortunately also no
tables for the big image (big_picture.gif).

If you have PHP on your server you could request the image via a PHP
page that specifies the width and height.

<a
href="imagepage.php?image=big_picture.gif&width=3000&height=2000"><img
src="small_picture.gif"></a>

The PHP file could generate a response that contains the HTML you
require.
 
D

dorayme

Stefan Mueller said:
my original questing was how to show a big image within <a href
...></a>?
<a href="big_picture.gif"><img src="small_picture.gif"></a>

What are you wanting exactly? You can't show anything but text
within a string of text? Within what then? Their browser window?
Their monitor with Photoshop running? What, where, why?

Are you asking how to enable someone to see a big picture on
their screen via a link which itself is a small picture (like a
thumbnail)? What is wrong with what you have? What is wrong with
putting in the dimensions? Why do you care what happens at the
other end as long as the receiver gets the file?

Do you want to make the big pic available to others for printing?
Downloading it to see on their computers via an ordinary link is
not incompatible with this.

If need be, say it in German and someone will translate it.
There's a bloke in this alt.html that goes around Europe on a
motorbike, if he calls into an internet cafe and sees your post,
he will translate.
 
F

fred.haab

Stefan said:
Hello

If I'd like to show an image in its original size or in other words if I'd
like to force the browser to use scroll bars if the image is too big I use
<img width=1500 height=1100 src=""big_picture.gif">
I don't need to use tables. But that's also a cute idea. Thanks for this
hint.

However, my original questing was how to show a big image within <a href
...></a>?
<a href="big_picture.gif"><img src="small_picture.gif"></a>

Here I'm not able to use 'width' and 'height' and unfortunately also no
tables for the big image (big_picture.gif).

Stefan

Yeah...

Unfortunately, just showing a raw image, you have zero control... I
mean, it's not even in a web page. You'd have to create a simple html
file for each image, OR you can do something like what Steven suggested
(because, really, the reason is that you probably don't want to
generate an html page per image when you might have hundreds of them),
OR you can do client side scripting and require the user to have
scripting enabled. It would be a pretty simple javascript, ultimately,
embedded in a simple

<table><tr><td><img id="my_image"></td></tr></table>

Then the link would be <a
href="show_my_image?image=the_real_image_name.jpg">

And then you'd need some javascript to parse the query string and get
the image name.

So... yeah... to just tell a browser "show the next raw image at full
size" is not possible, you have to be able to mark it up yourself,
which means it needs to be in a page.
 
S

Stefan Mueller

You'd have to create a simple html file for each image.

That's exact what I'm doing right now.

Many thanks to all for your explanations
Stefan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top