Enlarge image from a photo

B

brelade

I have 2 x questions about the above.

1. I am happy how to enlarge an image from text below an image: I have
placed the enlarged images on my server then made an absolute link as follows.
<a target="_blank"
href="http://www.breladecockerspaniels.co.uk/images/cocker_spaniel_dogs/toby_head.JPG">Enlarge image</a>
All works OK.
What i would like to know is, how to place the link straight on the photo.

2. Is there a way to dictate the size of the window that opens, as at
present it opens a full size window

I have tried to put the above address staright into a hyperlink, but it does
not work, i have also tried to browse in hyperlink for my server, again no
joy.

Is there a way to have the link straight from the image rather than at
present as a link below.

Many Thanks
 
D

DavidF

brelade,

1. This code snippet should work as is, but is not what you should use. Try
inserting the snippet, and then I will explain why you shouldn't use it as
written (and by the way, I don't pretend to be a coder...or that this hacked
together piece of code is the proper way to write it ;-) Insert the
following and do a web page preview:

<a target="_blank"
href="http://www.breladecockerspaniels.co.uk/images/cocker_spaniel_dogs/toby_head.jpg"><IMG
SRC=http://www.breladecockerspaniels.co.uk/images/cocker_spaniel_dogs/toby_head.jpg
ALT="Toby Head" border="0" width="120" height="175"></a>

The primary reason this snippet shouldn't be used as is...because it is
importing the same, large, high resolution 705 X 1024 image as it links to,
but it is importing it into a 120 X 175 space. You should have a "thumbnail"
size image that you are importing into that space to save loading time.

You should resize and optimize the image you want to import into the page
and upload it to your images file. I assumed that you wanted a thumbnail
that is 120 pixels wide, which dictated almost a 175 pixel length to
maintain the aspect ratio of the picture. However, when you resize your
image in an image editing program to 120, then note what the length is, and
substitute in that length instead of the 175. As you are going to optimize
the images, you can use 72 dpi for the smallest and fastest loading image,
or 96 dpi for a larger, slower loading, but "best quality" image, assuming
the viewer has there monitor set to view at 96. As you are linking to a
"best quality" image, I would suggest sticking with the 72 dpi for the
thumbnail imported into the page, as you want to maximize loading
speed...not quality. Just experiment with your thumbnail size and
resolution.

And for that matter, if you are going to do this, you should also resize and
optimize the large picture too. You are bypassing the "compress graphics"
feature in Publisher when you approach things this way. It appears to me
that your large image is over 2 megs, and is probably in its original
resolution and size. 2 megs is too large....takes me 10 minutes on my
dial-up connection to load the darn thing. Guess who is not going to wait.

Assuming that you do make a thumbnail picture, and you call it
"toby_head_120.jpg" then just change the link accordingly. Note change
border to 1 and you will get a border. And of course you can change the Alt
tag to anything you want from "Toby Head" (mouseover the image in web page
preview and it will show the Alt tag).


<a target="_blank"
href="http://www.breladecockerspaniels.co.uk/images/cocker_spaniel_dogs/toby_head.jpg"><IMG
SRC="http://www.breladecockerspaniels.co.uk/images/cocker_spaniel_dogs/toby_head_120.jpg"
ALT="Toby Head" border="0" width="120" height="175"></a>


Also when you get ready to size the html code fragment box, I would suggest
temporarily inserting the thumbnail image into the page, and sizing it full
size: Format > Picture > Size Tab and Scale at 100%. Then you can size the
code fragment box the same size by use the snap to function. Just move the
code fragment box over to touch the inserted thumbnail, and change the
dimension of the box to exactly the same as the thumbnail. Then you can
delete the thumbnail picture.

As per question 2...yeah, you can. I will give you an example snippet, but
you should figure out the tags and such yourself. I spent a lot of time on
sites such as http://www.htmlgoodies.com/ reading about html tags, and such,
and experimenting. You can do the same, but this will get you started. Try
inserting this code snippet:


<a target="_blank"
href="http://www.breladecockerspaniels.co.uk/images/cocker_spaniel_dogs/toby_head.JPG"onclick="NewWindow(this.href,'name','800','625','yes');return
false"><IMG
SRC="http://www.breladecockerspaniels.co.uk/images/cocker_spaniel_dogs/toby_head.JPG"
ALT="Toby Head" border="0" width="120" height="175"></a>


Have fun....DavidF
 
D

DavidF

Oops... if you want the second code snippet to work correctly, then you also
need to insert the following snippet on the page:

--------------------

<script language="javascript">

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

</script>
 
B

brelade

Sorry it's taken so long to reply, been mega busy.

Many thanks for your reply to my question, your suggestion works well, but
found it easier to have the text version as a link rather than have just have
code on my design page, will work on your suggestion further when time allows.

Have you looked any futher in to Vista yet.
Until the next time.
Cheers
 
D

DavidF

I understand about the desire to have the picture in your design, but keep
it in mind as it does allow for the best quality pictures. You bypass the
coding engine so Publisher doesn't substitute in a different picture.

No, I really haven't had much time either. I have been dragging my feet on
installing Vista on my test partition as I really have no desire to upgrade
my production machines from XP. But I guess I will have to. I have been
reading some about the issue, and MSFT has made some changes in IE7, and it
does not support FTP as it did in IE6. It appears it isn't as much a problem
with Vista as it is with IE7. I think that ultimately I will be suggesting
using FileZilla or some other third party FTP client instead of IE7, but I
do want to work through the steps you provided, and at least see if there is
a reasonable way of using FTP without that step.

Perhaps if Rob reads this he can add anything he knows about the changes in
IE7 and FTP?? Hint, hint Rob ;-)

DavidF
 

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

Top