> From: Roy Schestowitz <firstname.lastname@example.org>
> Organization: Sirius Cybernetics Corporation
> Newsgroups: alt.html
> Date: Thu, 21 Apr 2005 05:35:50 +0100
> Subject: Scaling IMG
> I have been been searching the Web, trying to find a way of resizing images
> while retaining the original aspect ratio. I know I can use 'height' and
> 'width', but finding out the necessary values for many images is laborious.
> Is there an equivalent (with or without CSS) to 'scale' in LaTeX? For
> example <img scale="80%" src="myimage" />?
> Thanks in advance,
If you must, and don't want to calculate the percentages and want to put the
dimensions to reserve a space in the HTML, you could make a small
spreadsheet calculator and have it handy. Say, A1 and A2 are the width and
height. You have B1 to enter the percentage you want to reduce it by. In C1
you have a formula something like =SUM((B1*A1)/100) while in C2 you have
=SUM((B1*A2)/100). You just have to enter the height and width of the actual
and the percentage you want reduced. If, God forbid, you want to increase by
a percentage, you need to add a bit to the formulae, "A1+" and "A2+" (I
don't know how it works in MS software but it has to be simple and similar)
But not a good idea as others have pointed out. If you want to do it right
and want a quick way, I can recommend my own method: in Photoshop I have
scripted it so the F1 key brings up the image size dialog box, it being the
commonest thing when readying pics for the web. In the dialog box, if you
have "constrain proportions" ticked, just enter one figure for width
(usually but handier to use height for portrait size) - the software has the
calc built in and the other dimension appears.
Handy too is dragging the pic to a browser, the dims often show up in the
title bar. If you use Toby Inkster's point, you just set one dim and get the
other from the browser...