Re: resizing gifs

Subject: Re: resizing gifs
From: "Gary S. Callison" <huey -at- interaccess -dot- com>
To: techwr-l -at- lists -dot- raycomm -dot- com
Date: Wed, 11 Feb 2004 12:30:53 -0600 (CST)


henning -at- r-l -dot- de (Jan Henning) wrote:
> | They all produce horrible quality. Is there any way I can resize this
> | image and retain a modicum of quality?
> What kind of image is it? It sounds like you're trying to resize a
> screenshot, and if that is true, the simple answer is: no, you can't.
> The reason is equally simple: You can imagine a bitmap image (such as
> Gif, Tiff, BMP, JPEG, or PNG) as a mosaic of square colored tiles, each
> pixel being a tile of a particular color (but no tile having more than
> one color). When you reduce an image from, say 400 by 300 pixels to 200
> by 150, you throw away three quarters of the tiles and have to recreate
> the image with the rest of them that still cannot have more than one
> color each.
> Clearly, you lose information. And if your original, large image
> contains structures that require only one tile (pixel) to display in
> one dimension (e.g., a line), the result cannot be anything but
> "horrible".
> This is a mathematical law, and there is no tool or technique to
> circumvent it...

I disagree. Yes, you're going to lose wads of information, but there's a
way to keep some of the detail. Obviously, you're correct in pointing out
that lots of image detail gets lost when an image gets resized down a
lot. The solution to that is to blur the original image so the fine
details become larger, which exaggerates those details in the process of
choosing what pixel best represents the data in the rest of the tiles
you're throwing away.

I use a copy of LView Pro 1D2 I bought years ago, because it's familiar
and does what I need it to, but any decent graphics-hacking tool probably
has some kind of image filtering mechanism. The filter I apply to images
being shrunk to as small as 25% of their original size takes the color
values of the 8 pixels immediately surrounding each pixel, and adds 1/8
of each of them to that center pixel. This blurs all of the detail in the
image, but results in having something that you can shrink down by a
factor of 3 and still see some details that were previously only one
pixel wide.

So, if you have 12-point text in a 1600x1200 image, and you shrink that
down to 400x300, it's going to look like crap and be unreadable, but it
will still be identifiable as text. I've just done this, and the word
"The" at the beginning of a sentence is a 6x3 greyscale image, but the
shape is there, and in context it's obviously the word 'The', even if
blown up, it looks like this:

XXX
*.*.:
X**:.

This is how I get screenshots of huge things into images that fit on
7-1/2x10 printouts. If you don't want to lose fine details when resizing
an image down, blur the image and exaggerate them. Try it!

--
Huey





Follow-Ups:

Previous by Author: Documenting Web Services
Next by Author: RE: Re: "If the docs are too good..."
Previous by Thread: Re: resizing gifs
Next by Thread: Re: resizing gifs


What this post helpful? Share it with friends and colleagues:


Sponsored Ads