Web Development Information |
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
Multimedia: Use Lossy Compression for Smaller GIFs and PNGs http://www.websiteoptimization.com/speed/tweak/lossy/
Multimedia: Use Weighted Optimization
Optimizing Web Graphics
PNG Home Site
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: Unable to open RSS Feed $XMLfilename with error HTTP ERROR: 404, exiting |
RELATED ARTICLES
Why You Really Need Your Own Web Page In-order To Make Online Business! How many Web Sites did you stumble over telling you that you don't actually need your own? Now, this is true to a certain extend but not if you are heading for the real scoop.What we all aim for is to go from point A to B in the shortest time. Make Your Own Brand! There are millions and millions of websites on the Internet. You NEED to be different in some way from all of them! If you could get a visitor to your website, that means nothing. The Birth of a Professional Web Site The Internet has opened a whole New World of opportunity for all of us. With the vast amount of information available at your fingertips, it has never been easier to communicate your message to the world. What Works and What not Works for Your Internet Business "Build it and they will come."--Filed of Dreams (1989) If you are working on an Internet business, you may read a lot of information for how quickly you can make money online. Making Your Websites More Compelling The Internet is a remarkable publishing medium. With just a little effort, you can make your web pages visually irresistible by playing with color, shapes and text. Building eCommerce Websites that Work - Part 2 Succeeding with an eCommerce website is a dream for many these days. It may seem nearly impossible at times, but it can be done. Search Engines and Customers Want Focused Web Site Content How do you decide on the content, products and or services you will promote on your Web site.Or should I go back one step further and ask why did you decide to create a website in the first place. Your Content for Nothing and Your Clicks for Free The first thing my business consultant (read brother-in-law) asked me, when I told him that I wanted to build a website and put AdSense on it was, "Do you want to build a site to help people or to make money?" After thinking about it for a while I couldn't imagine why I shouldn't do both. Why not a website that helps people and generates money for me? My consultant looked at me like I had taken one too many falls off my bike, which he knew I road primarily to save on the cost of gas, but he proceeded forward. Running An Effective Website Running an effective website is a continuous process. I have compiled five (5) ways of doing it on a regular basis. Profitable Websites for Exclusive Industries In the region where my company is located, South Bend, Indiana, the demand for web design and associated services could be described as: leery. It's not that the locale is horribly lacking evolvement technologically; rather that so many proprietors in this area are very uncertain as to what the internet can do and how they can go about forming profitable web sites for their exclusive industries. Remember This When Building A New Site - Beginners Guide I recently helped my mom to launch a website (www.mom2me. Top 7 Reasons Why Your Business Needs a Website A website provides invaluable advantages for businesses who have one.7 reasons why your business needs a website are:1. How to Get Your Website In Front of Thousands of Customers At No Cost To You! Dan Kennedy once said that if you can't make money without money? then? you won't make money with money either.Those words swirled in my brain over and over. Web Coach Tip: What You Should Know About DIY Web Sites Recently, a friend asked "What's the deal with those DIY companies that advertise "How to get a website with everything your business needs for under $20 bucks a month?". "How can they do that?" she said. Selecting a Web Content Management Product So you want to take a look at a real Web Content Management (WCM) product. How do you go about evaluating all the different products and vendors? What should you be looking for in a WCM package? Is it better to build your own, buy or use Open Source?The best way to answer this question is to compare the products on an apples to apples basis. HTML Editors - How to Choose the Right One for Building Your Websites There are lots of HTML editors on the market, however, you will want to look for one that has specific tools that will make building your websites easy, straightforward, and as stress-free as possible. Review the following requirements you should look for in an HTML editor. Why You Need A Web Site "I have a small business with just a couple of employees and I don't think my product can really be sold online. Do I need a web site?"In this day and time, there is very little that can't be sold over the Internet. Eight Deadly Web Site Mistakes and How to Avoid Them Creating and maintaining an effective presence on the Web has become increasingly complex and challenging as the power of the Internet as a marketing tool becomes more and more necessary to entrepreneurs and emerging businesses.The good news is that technologies that were only available to the big guys just a couple of years ago - audio, video, ecommerce, e-mail database management applications - are now affordable for almost everybody. How Did You Get Here? When marketing your website, it's important to know which of your efforts are producing results and which of them are a waste of time.You can learn a lot about this by analyzing your website's statistics (assuming your webhost offers this service). 7 Golden Rules For Building Mini Sites First, an eye opener. Making your fortune throughaffiliate programs on the internet is not easy. |
home | site map | contact us |