Web Development

Web Development - All The Information You Need On Web Development

Web Site Optimization: How To Speed Up Your Web Site By Minimizing Your Gif And Png Image Bit-depth


Web Development

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







Car Insurance Rates   |   Dental Insurance   |   Health Insurance   |   Home Owner Insurance   |   Life Insurance Quote



| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |











Build It And They Will Come
Build it and they will come is not always true; you have to form a relationship with the company before you will get quality attendees or participants for a free service.The key to a human's heart is through food. The key to a web surfer is free informat...(related: Web Development)


How Disabled Users Access The Internet
In 1995 a new era of accessibility for disabled people began. The Disability Discrimination Act was passe...(related: Web Development)


How To Get A Knock Out Website!
The first step in setting up an online business...Starting an online business for a brand new entrepreneur is a lot like falling in love for the first time. There is enthusiasm, the feeling of a new high in life and determination to make it work at all costs. All superior emotions, but making sure that your business grows will also take a sharp reality check. The reality is that along with enthusiasm and determination, you also need to be a smart marketer to make your business profitable....(related: Web Development)


How To Promote Your Law Firm Website On The Internet For Maximum Profit
Making maximum profit from your law firm website is important, but as a lawyer you might not have any clue about search engine optimization and Internet marketing for your legal site. However, it is not so difficult to poise your website to be successful online even if you are not experienced with Internet marketing and driving website traffic. All you have to do is review the following tips and include them in your website marketing plan. Before you know it you will notice that your website counter is recording more hits per day and telling you that your directories, keywords, and links are working.Tip #1 - Submitting to Law DirectoriesTake some time online to orient yourself with the myriad of law directories available. Register your domain name and the type of law you practice with as many law directories as you possibly can. By ...(related: Web Development)


How To Listen On The Web
When building a relationship, listening is more important than talking.A website can reveal a great...(related: Web Development)




Google




Do Authors Need A Website?
"I am a writer, not a business-person. I don't want to have anything at all to do with business," you might think. But how mistaken you can be. As a writer of two books, I discovered the amazing opportunities available to someone who has a website.What are these opportunities? Here are just seven of them:1. An online presence shows that you take your work very seriously and are prepared to market to the world!2. One of the most useful things a website can do is that it can save you time and money for postage, envelopes, paper and photocopying. In today's internet world, more and more publishers are willing to consider submissions using the internet.3. The moment you have a website up, you have the amazing opportunity to publish your own articles. How may times I have heard people say, "I don't mind no...(related: Web Development)

How Your Own Website Helps Your Small Business Grow
What do you mean, you don't have a website for your small business? Now that the Internet age is well and truly upon us, small business owners who haven't yet realised what a well-designed website could do for their business are getting harder and harder to find. If you're one of them, though, read on to find out how starting your own website could help your small business grow.A small business website widens your client baseAnd it doesn't just increase it a little bit either - it increases it a lot! If your business currently gets most of its custom from pass-by trade, or from word of mouth, you could be amazed at the amount of new business your own website could bring you. When you get your website online, you're no longer restricting yourself to your own local area: your small business website can be seen be people all over the w...(related: Web Development)


Warning: include(dynalinks/124.htm) [function.include]: failed to open stream: No such file or directory in /home/leaders/public_html/net-success/article-directory-about-web-topics/web-development/dynalinks.php on line 28

Warning: include(dynalinks/124.htm) [function.include]: failed to open stream: No such file or directory in /home/leaders/public_html/net-success/article-directory-about-web-topics/web-development/dynalinks.php on line 28

Warning: include() [function.include]: Failed opening 'dynalinks/124.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/leaders/public_html/net-success/article-directory-about-web-topics/web-development/dynalinks.php on line 28

site-map - Copyright © 2006 | Contact Webmaster | All Rights Reserved. | Web Development


Parenting Advice | Career Builders | Backyard Vacations | Home Loan Bonds SA | Worldwide Travel Bookings