[thelist] Cropping images rather thn "squishing" them

elkay lwkraemer at earthlink.net
Sat Jul 8 16:18:20 CDT 2000


Greg,

You are NOT cropping the image. You are resizing it. Browsers don't know how
to crop images (short of using script to clip them). You'll want to use your
graphics application to resize your images before you include them in your
site.

Your example merely 'displays' your image at a width of 100px and its actual
height. Hence it 'squishes'.

For example: If your actual image is 200X300, your tag would display it as
100X300. To retain the Width/Height relationship, your tag should also set
the height as 150 (1/2 original width X 1/2 original height).

In practice, though, this is not good. Your original 200X300 image is bound
to be about 4 times as large as what you want to display, say 20K vs 5K. The
browser has to download the 20K even though you're displaying the equivalent
of an image that could be 5K.

The bottom line is: Don't use the browser to size your images... Size them
before they get there! Then your Width/Height attributes should be set to
the actual size of the image to add the browser with allocating the space
needed for the image prior to receiving it fully.

Get my drift?

LK

----- Original Message -----
From: "Greg Strange" <gstrange at e-tsi.com>
To: <thelist at lists.evolt.org>
Sent: Saturday, July 08, 2000 12:50 PM
Subject: [thelist] Cropping images rather thn "squishing" them


> Hello all.
>
> Does anyone know of a way to crop images rather than squish them?
> what I mean to be specific is that whenever I use (obviously) <IMG
> SRC="blah.blah.com/image.xxx" WIDTH=100> where the image is greater than
> 100px the pic gets squished and distorted.
>
> Is there some trick to cropping them, or that simply impossible?
>
> Thanks.
>
> Greg
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>





More information about the thelist mailing list