Top Web Hosting Reviews
Top Web Hosting Provider of The Month:
Top Web Hosting
Visit Bluehost.com | Read Bluehost Review

>> Web Hosting Geeks // Web Hosting Articles // Web Development  


Web Site Optimization: How To Speed Up Your Web Site By Minimizing Your GIF and PNG Image Bit-Depth








Are bloated images slowing down your web site and causing you lost business? Images comprise over 50% of the average web page so putting them on a diet is essential to improving web performance. One of the best ways to optimize GIFs and PNGs is to minimize the "bit-depth" or the number of colors within your images.

For palette-based formats like GIF and PNG, file size is directly related to the size of the color palette, or the number of colors in the image. As the number of colors in an image crosses a power of two, the file size jumps. A 33-color image must use a six-bit palette, while a 32-color image can use a 5-bit palette. Smaller palettes mean smaller codes (representing pixel patterns), which makes for smaller files. So minimizing the number of colors in index-color images like GIFs and PNGs will minimize file size.

The compression schemes used in GIFs (LZW) and PNGs (Deflate) are dictionary-based encoding algorithms. Dictionary based compression algorithms substitute shorter codes for longer patterns of strings within the data stream. Pixel patterns (substrings) in the data stream found in the dictionary are replaced with a single code. If a substring is not found in the dictionary, a new code is created and added to the dictionary. Compression is achieved when smaller codes are substituted for longer patterns of data.

The code size is based on the number of bits per pixel, and depends on the maximum length code within your dictionary. Thus the smaller your bit-depth, the smaller the codes representing your pixel pattern strings, and the smaller the file.

Choosing the right format for your images is the first step in optimizing web graphics. At lower bit-depths, banding can appear in smooth-toned images. Try quantizing your image to different palettes to minimize banding.

PNG Compression

PNG uses the deflate compression algorithm which is a newer, more efficient cousin of LZW. Deflate is designed to be free of patent problems. Deflate is a combination of the LZ77 algorithm found in zip programs like WinZIP and gzip, and Huffman coding. Deflate typically compresses files 20 to 30 percent smaller than LZW, which is the difference you'll find between gzip and compress. PNGs use a similar substitution technique, but are generally 5 to 25 percent smaller than GIFs, although there are exceptions. In addition to horizontal "scan-line" pattern substitution PNGs sometimes substitute for vertical patterns. PNG can also truncate color palettes. In general, the smaller the color palette, the smaller the overal file size.

Conclusion

To minimize the file size of palette-based image formats like GIF and PNG, minimize their bit-depth, or number of colors. Each time you pass a power of two, file size jumps higher. By minimizing the number of colors, and maximizing the flat-color areas you will create smaller, more efficient images destined for the Web.

Further Reading:

LZW Data Compression


http://www.dogma.net/markn/articles/lzw/lzw.htm


Mark Nelson breaks down the LZW compression algorithm for Dr. Dobb's Journal of October 1989.

Multimedia: Use Lossy Compression for Smaller GIFs and PNGs http://www.websiteoptimization.com/speed/tweak/lossy/


Lossy compression lets you squeeze more bytes out of your GIFs and PNGs. Lossy compression increases identical pixel patterns to improve compression in indexed-color images.

Multimedia: Use Weighted Optimization


http://www.websiteoptimization.com/speed/tweak/weighted/


Weighted optimization or regional compression applies different degrees of compression to different areas of your image. By varying the quality within images you can improve file size.

Optimizing Web Graphics


http://www.websiteoptimization.com/speed/12/


Chapter summary from Speed Up Your Site, shows how to correct, optimize, and compress images for minimum file size and maximum quality.

PNG Home Site


http://www.libpng.org/pub/png/


Greg Roelofs site devoted to all things PNG.

About The Author

Article by Andy King, author of the popular new book titled "Speed Up Your Site - Web Site Optimization". Visit Andy King's web site to learn the best Web Site Optimization practices for higher traffic and speed guaranteed. www.websiteoptimization.com


MORE RESOURCES:

New, moving or expanding: Web development company opens in Sartell
St. Cloud Times
SARTELL — Stonebreakers Design, a new Web development company based in Sartell, ...

and more »


The UK's Best Web Development Firms Named by uk.topseos.com for March 2010
Online PR News (press release)
The March 2010 rankings of the best web development firms were released by uk.topseos.com, the independent authority on search vendors. ...

and more »


Dynamic Business

Strategy before execution essential in social media
istockAnalyst.com (press release)
 says Rose, founder of Blue Media Boutique, a Knoxville Web development firm that recently joined with Mary Beth West Consulting to promote their strategic ...
Strategy before execution essential in social mediaKnoxville News Sentinel

all 62 news articles »


bestwebdesignagencies.com Releases The March 2010 Rankings of the Best Symfony ...
Online PR News (press release)
The best Symfony development firms were unveiled by the independent authority on the best web development firms, bestwebdesignagencies.com, for March 2010. ...
bestwebdesignagencies.com Announces the Best ColdFusion Development Firms for ...Online PR News (press release)

all 2 news articles »


JK Design Welcomes New Producer to Web Development Team
PR-CANADA.net (press release)
JK Design, a leading Web development and print media agency in central New Jersey, has announced that Brian Faust recently joined the company as a Web ...



topseos.com Names the Best Web Development Specialist for March 2010
Online PR News (press release)
The companies on this list were found to be the best in the industry when it comes to web development. Thousands of applicants were filtered through until ...

and more »


IndyPosted (blog)

Microsoft touts Windows Phone 7 Series and Silverlight 4
InfoWorld
Mix10 on Tuesday will feature details on the planned Internet Explorer 9 browser, ASP.Net and services-based Web development.
IE9, Windows Phone, Silverlight: What can we expect from Microsoft at MIX?BetaNews

all 186 news articles »


Dotcom Celebrates Silver Anniversary
WJXT Jacksonville
... dot-com domain name -- Symbolics.com -- appeared on the Internet, ushering in the commercial age of the World Wide Web. Development was slow, at first. ...

and more »


Source Technology Limited, To Fulfill The Demand For Web Design And Development
Wire Service Canada (press release)
Hong Kong, March 15, 2010- Known for its artistic web design and functional web development services, Source Technology Limited today disclosed its idea of ...
Source gives you professional web site design solutionsBigNews.biz (press release)

all 3 news articles »


Determined not to get bit in downturn
Knoxville News Sentinel
Ross Croley located his Web development firm In10sity in two houses that sit on six acres in Lenoir City, foregoing a visible West Knoxville ...


Google News





 
 
 

© 2004 - 2008 "Web Hosting Geeks" | Web Hosting Reviews | Customer Reviews | RealMetrics Reviews | Hosting Articles | Directory | Partners | Contacts
Over 7000 articles: web hosting, web development, domain names, ecommerce, web design, site promotion, ppc advertising, seo, site promotion and many others.
Web hosting reviews, ratings and awards are not based on any incentives or commissions. Names and trademarks are the properties of their respective owners.
A direct link to Web Hosting Geeks (http://webhostinggeeks.com) must be provided in order to use any of the above information. Contact us for more info.

Partners: Hosts by speed, Cheap Website Hosting, Free Website Hosting, Cheap Web Hosting, Top 10 Web Hosts, Top 10 Web Hosting Deals, Best Website Hosting, Free Web Hosting, Free Web Hosting, Dedicated Server Hosting, Adult Web Hosting, Web Hosting Discussions, Dedicated Server Reviews, Best Web Hosting, Web Hosting Discounts, HostProfessor.com, rsuog, halyava, PHP Website Hosting Services, Web Hosting Reviews, Hosting Uptime, Best Web Hosting Reviews, Cheap Webhosting, Web Hosting, Flash Templates, CMS Templates, Web Hosting Reviews, Website Hosting Reviews, Web Hosting Providers, Best Web Hosting, Top Web Hosting, RSUOG Web Hosting