[thelist] Slicing images -- opinion?
Sam Foster
sam at sam-i-am.com
Thu Jul 29 15:22:29 CDT 2004
James Denholm-Price wrote:
> Hi all,
>
> Developer Shed has a clear How-To article on slicing images with
> Photoshop: http://www.devarticles.com/c/a/Photoshop/Slicing-and-Saving-Graphics-in-Photoshop-for-Use-on-the-Web/
>
> Having read it I just wondered what the community thought: How
> important do you think it is to save bytes in this way?
what's the alternative? To my mind this is the only way to do it.. and
this is just as true these days with CSS-only layouts as with tabled
layouts. In a CSS layout you are typically making background images..
with tables it could be either background or inline.
The only point I disagree on it the use of 1px high (or wide --
depending on which way it tiles) slices. These can appear to wipe in on
a taxed or lower-spec machine, as the little graphic has to be
duplicated across the entire area - sometimes causing a noticeable
perfomance hit. I'd normally use a (e.g.) 20px high background image for
vertical tiling - or more if I expect it to be tiling down an entire
page. Likewise for horizontally tiling images. The GIF format (LZW
compression actually) is pretty forgiving of this kind of redundant data
and the few extra bytes are offset by a quicker draw time on the client
display. With jpegs its a different story as the more pixels you have
(usually) the proportionally more bytes you have... and with a larger
tile image you might start to see a pattern caused by the jpeg
compression artifacts.
Generally speaking when you're chopping images like this you are
balancing the ease of development and maintenance with the fidelity of
the design rendering, with the download times. I don't think "these
days" are any different to past days in the need for fast downloads and
bandwidth-usage reduction. The lighter, the faster the better, always.
Sam
More information about the thelist
mailing list