Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/a26f9f83/public_html/articles/includes/config.php on line 159
Web Site Optimization: How To Speed Up Your Web Site By Minimizing Your GIF and PNG Image Bit-Depth > NetSparsh - Viral Content you Love & Share

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

In The News:

This RSS feed URL is deprecated, please update. New URLs can be found in the footers at https://news.google.com/news

Customer Think

Know about the current trends in web development
Customer Think
In case of web development, you may have probably heard that the only constant is the change. It is an industry-defining statement as web development keeps on changing. User expectations are evolving rapidly, and it is quite essential than ever before ...


Techaeris

Web development services: What business opportunities do they provide?
Techaeris
Web development services are becoming more crucial with each passing day. Simple site builders can provide some semblance of a digital presence albeit a temporary one. A higher level of site quality is becoming a deciding factor that can make or break ...


Neowin

Pay What You Want for this Full Stack Web Development Bundle
Neowin
Today's highlighted deal comes via our Online Courses section of the Neowin Deals store, where you can Pay What You Want for the Full Stack Web Development Bundle. The world's best developers are Full Stack developers. Here's 122+ hours of ...


Business 2 Community

4 Ways to Ensure Effective Web Development
Business 2 Community
When it comes to building a new website, many businesses choose to focus predominantly on the design aspect of the project when approaching agencies to carry out the work. Whilst design is a vital part to any web development project, there are a vast ...


International Association of Athletics Federations

Job vacancy: Marketing and web development project manager
International Association of Athletics Federations
The IAAF is seeking a marketing and web development project manager at its Monaco headquarters. Reporting to the chief information officer, the marketing and web development project manager will oversee several projects and ensure that information ...


Coinpedia (press release) (blog)

Top 10 Crypto Web Development Company
Coinpedia (press release) (blog)
After the emergence of the first cryptocurrency in 2009, a chain of reactions started leading to the growth and development of the cryptocurrency industry. Here we are listing the Top ten companies that are leading in cryptocurrency web and application ...


Code Staff: Disrupting a 40 Billion Dollar Web Development Industry with Its Launch Success and Continued Popularity
Digital Journal
For clients and businesses, it still is hard to find quality and reliable experts in web design, web development or software development. While this is the dilemma to the client side, there are more than hundreds of thousands of tech professionals ...

and more »

Project6 Receives 2018 WebAward for Outsanding Achievement in Web Development for Clackamas Community ...
Markets Insider
EMERYVILLE, Calif., Sept. 25, 2018 /PRNewswire-PRWeb/ -- San Francisco Bay Area website design and development company Project6 is proud to announce that it has been awarded the 2018 WebAward for Outstanding Achievement in Web Development ...


Chicago Business Journal

Sun-Times partnering with Vox Media for website development
Chicago Business Journal
As part of the new partnership, the Sun-Times also will join Vox Media's digital advertising marketplace, a move Sun-Times management conceded could affect staffing in the newspaper's in-house advertising and web development units. According to the Vox ...

and more »

Huddle Today

Zwebra Web Development Company Shares Experience After One Year In NB
Huddle Today
“Founded in 2009, Zwebra specializes in custom web design, application development and digital marketing. Today, the company has four people working in offices in Saint John and Moncton and more than 20 specialists working in the office back in Ukraine.

Google News

Set Up Your Website in Minutes ? For Free

There was a time not long ago when setting up... Read More

Website Success is Key

The popular search engine Google indexes over 8 billion websites.... Read More

9 Keys to an Effective Website

Many small companies choose not to invest in a professionally... Read More

Make Your Artist Website Sell!

SummaryHere's the scoop on what you must know when designing... Read More

Developing State-enabled Applications With PHP

Installment 1Developing State-enabled Applications With PHPWhen a user is browsing... Read More

The Power Of CPanel

cPanel is a control panel for your website and allows... Read More

The 5 Biggest Mistakes Almost All Web Designers Make

Huge Mistake #1: Creating a Website with Flash -- Did... Read More

What YOU Should Know Before Getting A Web Site!

Everyday thousands of new businesses make the leap and take... Read More

Should You Design Your Own Website?

If you're anything like most small business owners, you probably... Read More

Guide to Internet Business - Website Setup

After planning the design and content of your website, it's... Read More

Building a Web Store on Shoestring Budget in less than Four Hours

Starting a business online is no longer as difficult as... Read More

Tell me what your website does!

You know exactly what your organisation does and what your... Read More

The Two Most Common Mistakes That Scare Away Web Visitors

Can you imagine the hypocrisy of spending thousands of dollars,... Read More

How to Increase Sales with Automation Improvements

How popular is online shopping? And is there room for... Read More

Why You Need a Website

You hear a great deal about the Internet these days... Read More

What ROI You Should Expect From Your Web Site

Is Your Web Site an Expense or an Investment?Why don't... Read More

Wheres Your Focus, Money or Customer?

Is your website Really useful?I had a 'rep' in yesterday... Read More

Where on Earth is Your Websitee?

You've just finished congratulating your marketing team. After six months... Read More

Web Success Secret - Keep Your Visitors Interested

Visitors to your site come looking for information or solutions... Read More

Disability Discrimination Act (DDA) & Web Accessibility

There's been widespread speculation about the new legislation being introduced... Read More

Planning Your Website for Success

Most people know they need a website in order to... Read More

Whats Your Business Online Attitude?

This article was prompted by some customer support work I... Read More

Do You And Your Website Have Credibility?

I recently received an unsolicited e-mail from some company offering... Read More

Websites: You Get What You Pay For!

So you finally decided to invest in a web presence... Read More

Web Site Promotion: How To Advertise Your Website For Profits

Making money with your web site is the dream and... Read More