Home | Registration | Catalog | Resources | Hosting | Services | Support | Contact Us | Downloads | Press Room | Search

Give Your Web Site A Professional Makeover Quickly And Easily DPA Software
Scaling GIFs  

 

Subscribe to our

Newsletter

Email Address

 

Login

Bookmark this Page
 

Up
Using Splash Pages
Page Redirection
Java & Windows
Screen Captures
Resampling
Scaling GIFs
Server Type
FP2003 FAQs
Adding Media
Thumbnails
Web Backup
Submit Button
FP2003 Shared Borders
Borders Meta Tag
Printable Pages
Favicons
Backup Tips
Bookmarks
Convert Word Art
Getting Hex Colors
Colored Scroll Bars
External Style Sheets
Reverse Publishing
Publishing Fixes
Detect and Repair
Table of Contents
TOC by Categories
FP Extensions
Picture Button

 

Downloads
FREE STUFF
Press Room
Search

Shopping Cart
 

No Items 

 

Check Out

 

 

Need FrontPage?

 

Great Price!

 

FrontPage How To

Volume 1 - Issue 6 - July 2003

Scaling GIF images
By David Pfeiffer of FrontLook.com

In the last FrontPage How-to issue, I discussed how to resample or scale an image in FrontPage to save on download time. When scaling .gif images (and sometimes even JPEG images), the image looks fuzzy or has noticeable missing pixels. The reason for these errors is the point sampling or nearest neighbor resampling algorithm used in Browser or FrontPage.


Original


Point Sampling


Interpolated

Interpolated w/ sharpening

Point Sampling
In the case where an image is scaled to 1/4th its original size (also referred to as down-sampling), the new pixel in the destination will represents an array of 4x4 pixels in the source image. In the nearest neighbor algorithm, only one pixel is chosen to represent all of its neighbors. This causes a loss of detail and missing pixel errors in the scaled image (see point sampling image above).

Interpolated Sampling
Good scaling algorithms use interpolation to create the destination pixels. In the 4:1 down-sampling example discussed above, all the pixels in the 4x4 area are taken into account in calculating the destination pixel. By allowing all the pixels in the source image to contribute to the destination image, the picture will not lose the pixel data (see Interpolated sampling image above). Interpolated images sometime appear blurry and are therefore sharpened a little bit.

GIF Scaling
A GIF image is an indexed-color image, meaning that the colors of the image have been reduced to small set of colors that are used over and over in the image. To properly scale a GIF image, it must first be converted to an RGB image so that pixels can be interpolated. This is accomplished by converting the image to RGB using the "Image->Mode" menu in a photo editor like Adobe Photoshop or Photoshop Elements (Photoshop Elements is a lower cost version of Photoshop that can do the same functions for less money).


Convert image to RGB mode

Once the image is converted to RGB, it can then be resampled or scaled down to a smaller size. In the illustration below, the original pixel size was 200 and it was then set to 100. Once the "OK" button is pressed, the image now appears smaller.


Scale Image using Bicubic or Bilinear Resampling

When down sampling an image, it often appears blurry. Using the Filter->Sharpen->Unsharp Mask... menu in Photoshop, you can sharpen the image. The typical settings for web images is shown below:


Sharpen Image

Saving the Scaled GIF Image
Once the image has been sharpened, it is time to save it as a .gif file again. In Photoshop, this is accomplished via the "File->Save for Web..." menu.


Save for Web

As stated above, the GIF image is an index-color image meaning that the colors of the image have been reduced to a limited set of colors, usually 4, 8, 16, 32, 64 or 128 colors. The reduction of colors is one of the reasons GIF images are more compact then other image types. The "Save for Web" dialog allow you to view the result of the color reduction process when saving a GIF image.


Save as a GIF Image

In the "Save for Web" dialog you can adjust the gif image depth, look at the new image size and make sure the preview is adequate. Once the image colors are optimum, press the "Save" button to save the image. Then import the image into your FrontPage web for use.

This same process can be used up-sampling of images or for JPEG images that "fall apart" in the down-sampling process.

 

DPA Software

Copyright 2004 DPA Software - All Rights Reserved

Last Modified : 03/06/2008 11:15 PM

We accept the following payment forms
POs and Checks and PayPal accepted
Privacy
Statement
Questions or Problems?
 Click here
Download Policy
Secured by SSL Certificate

All products come with a

FrontLook, Theme Chameleon, Image Chameleon and FrontLook Super Themes are trademarks of DPA Software. Microsoft FrontPage, SharePoint, Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Java is a trademark of Sun Microsystems. *PC Magazine is a registered trademark of Ziff Davis Publishing Holdings Inc. Used under license from Ziff Davis Media Inc.