Resizing gifs?

Subject: Resizing gifs?
From: Geoff Hart <ghart -at- videotron -dot- ca>
To: techwr-l -at- lists -dot- raycomm -dot- com, Elizabeth O'Shea <elizabeth -dot- oshea -at- virtualaccess -dot- com>
Date: Wed, 11 Feb 2004 09:21:19 -0500

Elizabeth O'Shea wrote: <<I'm sure this is simple, but...>>

Nothing about digital images is simple. Software should solve your problem for you--and indeed, tools such as Smooth Scaling from Wextech and RoboHelp's tool for smoothly resizing graphics do help--but you still have to jump through hoops sometimes.

<<We have a gif that's 1668 x 545 pixels. We also have the psd of this file. I've been asked to resize it to about 330 x 108 pixels. The resultilng quality is horrible.>>

First off, make sure you keep a safe backup copy of the original Photoshop (PSD) document. Wherever possible in image editing, work from the original image, not from a transformed image (such as the GIF you're trying to resize). Each time you transform a graphic, you lose data that you often can't get back.

<<I have: <snip several options>... changed the image size of the pds in Photoshop an used the SAve for Web option to save it as a gif - opened the gif in Illustrator, saved it as ai, resized it, and saved it for web. They all produce horrible quality.>>

The problem is twofold. First, there's a mismatch in resolution: do the math (original divided by final dimensions) and you'll see that any reduction near the value you want doesn't produce an integer value for both dimensions. This means that the software is trying to calculate the values for a fractional pixel and failing. You'll have better luck if you choose a final resolution closer to an integer value (e.g., 1668/4 = 417 pixels, which is close to what you want, but then you don't get an integer value for 545/4).

The second problem is one of scale: details that are sharp at 100% magnification are likely to be invisible at 20 or 25% magnification, particularly if those reduced details become smaller than 1 pixel in any dimension. So take a close look at your original image: any features that are smaller than about 5 pixels will disappear when you reduce the image (because they'll be too small to display in a single pixel). Can you simplify the original image to eliminate all such features? Can you enlarge all such features so that they're at least 5 pixels in each dimension? In short, simplify the image so that it'll work at the lower size.

Bottom line is that you're likely to get a fuzzy image from the current bitmap no matter what degree of resizing you try, since the x and y dimensions aren't easily divisible by the same number and since some features will vanish or blur because they're too small to remain visible at the smaller size. Probably the simplest possibility would be to crop the image to 1665 pixels so that both dimensions can be resized identically by a factor of 5 (to 333x109)--the lost of three pixels in the original should be undetectable at the new resolution. However, this won't solve the problem of features that shrink below 1 pixel in size.

Alternatively, redraw the figure from scratch so that each element is at the target size, or at some nice multiple thereof so that it will be at least 1 pixel high in the final image; if the image contains anything like vector art (e.g., rectangular or circular elements as opposed to random dots and patterns--bitmaps!), use a vector program such as Illustrator instead. That lets you scale the image far more smoothly to whatever size you want before converting it to a bitmap.

--Geoff Hart ghart -at- videotron -dot- ca
(try geoffhart -at- mac -dot- com if you don't get a reply)





References:
resizing gifs: From: Elizabeth O'Shea

Previous by Author: Make pixel shim invisible?
Next by Author: EM or EN usage <NIGHTMARE> !
Previous by Thread: Re: resizing gifs
Next by Thread: Re: resizing gifs


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


Sponsored Ads