Page is a not externally linkable
- Code, Content, and Presentation
-- Site Graphics and Multimedia Design
---- Scaling an image


rocknbil - 2:19 pm on Apr 24, 2009 (gmt 0)


What is happening when the image is resized in the browser is that the pixels are interpolated by the browser. That is, these pixels

.................... (20)
are turned into, say, these
.......... (10)

So the browser must guess and "skip" pixels in-between. When you resize in a graphics program, actual interpolation algorithms are applied and provide a more accurate interpolation of the pixels. Even this will likely show a degradation in most bitmap formats, but at least it's better to a degree, and you can add a sharpening filter to bring back some quality (although this fails horribly with formats lacking in anti-aliasing, such as .gif or other bitmap formats.)

Since you're restricted to server-side output, you might consider automating a process using imageMagick or the GD library to dynamically resize and output the images. ImageMagick has sharpening capabilities. Both are available to most server-side languages (perl, PHP . . . )


Thread source:: http://www.webmasterworld.com/graphics_multimedia/3899312.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com