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:

Web development trends 2019 - Ponder on them to make a difference  ITProPortalThe world of web development experiences demand constant transformation every year, whether it is related to tools, services, coding, languages, or designs.
Web Development on an iPad  Laravel NewsThe idea of working entirely from an iPad has always appealed to me. The portability, the battery life, and of course the touch screen makes it an excellent device ...
Web Development: What's Big In 2019?  HackadayI try to keep up with web development trends but it's hard to keep pace since it's such a fast evolving field. Barely a week goes by without the release of a new JS ...
What Skills Should You Look for in a Web Developer?  Customer ThinkIntroduction. Choosing a web development company is one of the most important decisions a business can make in today's marketplace. Simply put, how a ...
Web development school pushes for more tech-industry training  KMTV - 3 News NowThe Interface Web School, which is a part of the AIM Institute, wants to help put people to work in the growing tech industry.
From Salon Marketplace: Earn a web development certification with this bootcamp  SalonThe Beginner Full Stack Web Development course provides a strong foundation of digital knowledge.
These are five high-paying programming jobs right now  TechRepublicHere are the developer roles that careers *service* Dice found had high average salaries during 2018.
How to become full-stack web developer  JAXenterIf you're looking for a way to become a full-stack web developer, and amplify your chances of landing a well-paid job, here is the ultimate guideline.
This $41 course package can get you hired as a back-end web developer  The Next WebFront end developers get all the glory. Their work is always right there in a user's face with all that HTML and CSS goodness. But those in the know know that the ...
Best Programming Languages For Backend Web Development  TechnotificationHere are some interesting server-side web development programming languages worth considering for web development.
Score 9 courses on back-end web development for just $41  MashableAt the risk of sounding totally high: Websites are sort of like restaurants, when you think about it. Stick with us. You've got your front-end developers, who function ...
Kontainers offers smaller forwarders the chance to compete online  The LoadstarUK digital ocean freight start-up Kontainers plans to make further inroads into the freight forwarding community this year with a new product designed to appeal ...
Get a better Web site with Codehesion  ITWebCodehesion specialises in Web site design and development, and can help you to produce a world-class Web site at an affordable price. Codehesion showed ...
Top Five Programming Languages To Learn In 2019  Analytics India MagazineIn this article, we list 5 programming languages that are recommended for 2019 and the importance of these languages. These langyages are in great demand.
What is the best website design and website development companies in India? - Business Advice  Business.comThe ubiquity of web development companies in India doesn't really translate to the ease of finding them. You may ask your peers around and they will tell you ...
How Java Will Be Beneficial For Your Business In 2019  WhaTechJava is not new in the technology sphere. In fact, it's one of the oldest coding languages. It has brought about great development as programming generally has ...
Guidelines for iPhone Web-Development – OSnews  OS NewsApple posted on their developer website guidelines with instructions on optimising web-applications for the iPhone. “Developers can create Web 2.0 ...
Why an Understanding of UI and UX is Now Vital to Web Development Success! - WhaTech  WhaTechWhen developing a web site, the way the user will ultimately interact with that site has become very important to the ultimate success of the project.
Web Developer job, Johannesbug, Fourways  Bizcommunity.comDigital Briefcase is a digital marketing agency looking for a mid-level web developer to join our team from February 2019.Design, maintain and implement new ...
Albany Can Code graduates largest class ever  Times Union Albany. Albany Can Code graduated its largest class ever last Thursday, with 31 people earning their certificates in JavaScript Frameworks and Front End Web ...
Know Why Progressive Web Apps Essential for Businesses?  Customer ThinkIntroduction. There was a time a few years back when the businesses are classified into two groups, the one who has their website, and others who don't have.
TRICKC Digital Marketing Company Now Extends Its Web Development and SEO Services - Press Release  Digital JournalTRICKC is a well-established digital marketing agency with a sound client base in India and across the globe. It is a team of highly dedicated and creative team ...
Kunsh Technologies - web design and development company, India Awarded "Site of the Day" in Design...  WhaTechMany web design nominees and award winners will agree upon the notion that, we have earned a moment that you might call a virtual red carpet.
Top 3 Digital Marketing Tips to Increase Valentine's Day Consumer Spending in 2019  PR WebAmericans spend over $146 on Valentine's Day gifts per person. DesignRush rounded up the best marketing strategies to capture consumers AND leading ...
A Month With the Surface Laptop 2 and Surface Pro 6  Thurrott.comMicrosoft's Surface Laptop 2 and Surface Pro 6 are two of the fundamental pillars of the Surface brand. Surface Pro represents Microsoft's Surface line better ...
10 Best Jobs That Let You Work From Home  Career FAQs10 of the best work from home jobs in Australia. From social media management to software development, landing a work from home job is easier than you think.
5 Ways in Which Data Science Is Revolutionizing Web Development  Analytics InsightCustom software development companies are figuring out new ways to utilize the advanced data science techniques to build customized websites to suit specific ...
Trends You can Expect in Web Development for 2019  Customer ThinkThe current generation of website developers is ideal employees in consideration of web development spectrum. Most of the modern people respond quickly to ...
From being a rookie to grabbing an internship: Sanya's tryst with web development  QriusSanya Singh is a student of Northern India Engineering College, who learnt the ropes of web development through Internshala and bagged an internship.
9 Web development trends you simply cannot ignore in 2018  TechGenYZWeb development is a major part in conversions and increasing your sales.To optimize your websites know the web development trends of the year.
Learn Web Development for Free With App Academy  LifehackerCoding school App Academy has opened a free online interactive version of its 12-week curriculum. That's a pretty good deal, since the Academy's in-person ...
How Is Data Science Transforming Web Development?  DataconomyWeb app development is about to undergo a significant revolution triggered by the rise of data science. So far, developers have created apps based on focus ...
Know about the current trends in web development  Customer ThinkIn 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 ...
Careers in Web Development  Telangana TodayIn the last edition we have discussed about various technology stacks, what to learn and what is the career path. This article details about careers in web ...
Done Role of IoT in Web Development  Customer ThinkWith the increasing advent of technology and the ever-changing demands of people as well as businesses, there has been a rise in technologies which have ...
How will AI change the web development in future?  Customer ThinkAI is present everywhere – from chatbots to virtual assistants, AI is used in day to day activities. Virtual assistants like Siri and Cortana are helping the users by ...
Miami-Dade County to launch all new miamidade.gov website  Miami's Community NewspapersMiami-Dade County launched it newly redesigned website, miamidade.gov, on Tuesday, Jan. 15. The new website puts the focus on the resident, bringing ...
How IoT Is Changing Web Development  IoT For AllIoT brings changes to software development on many levels, including on the web. Let's discuss the main peculiarities and nuances of IoT web development.
Focusing on data science and web development, edtech startup edWisor looks to bridge the skill gap  YourStory.comBootstrapped edWisor looks to address skill shortage in the areas of data science and web development, and uses gamification to align freshers with industry ...
4 Ways Web Development Has Changed Over the Years  The Hans IndiaWeb development has seen many changes over the years New ideas, new technologies and what is acceptable as an industry standard has pushed web ...
JavaScript and Web Development InfoQ Trends Report  InfoQ.comThis InfoQ Trends Report looks at the current trends with JavaScript, HTML, CSS, and web development in general, exploring technologies and options gaining ...
Five hacks to land a top-notch internship in web development  Daily News & AnalysisWhether you've got your degree in web development or you're still studying, it is imperative to gain some practical experience in the field. But, landing a web ...
Things You Should Definitely Know About Web Development Team  Customer ThinkImagine one time you came up with a great idea to create a website for your company. The first step to take in this case is to hire a web development team of ...
3 Reasons to utilize background checks  TechGenYZSo you think that your business needs a web presence. For an unmatched website, you would love to hire the best web development company. However, just ...
Spring MVC tutorial: How Spring Boot web MVC makes Java app development easy  TheServerSide.comThere are many Java web development tutorials available online, but there are very few Spring MVC examples that run within a Spring Boot project. This Spring ...
Microsoft brings Chromium to Edge to reduce web development fragmentation  SDTimes.comMicrosoft has announced plans to adopt Chromium into Microsoft Edge on desktop. Chromium is an open-source web browser project created by Google.
4 Questions to Ask a Web Developer During an Interview  DevOps.comWeb development is a fragile process. You need talented web developers to make truly beautiful sites with seamless user experiences and fast loading There's ...
Lean Web Development with the Best Teachers Online  Digital InspirationFor the past few months, I have been on a learning spree looking to enhance my existing coding skills and also learn new programming languages and ...
Report: What is the next big thing in web development?  JAXenterThe 2018 Packt Skill Up Report: We take a closer look at web development: What technologies are currently number one and what does the future hold?
How do I know if Web Development is right for me?  TechRepublicHow do you know if you're ready for a career change in tech, and if that change is right for you? A TechRepublic member is trying figure this out and is asking ...
6 steps to becoming a full stack developer  TechGenixThe journey to becoming a full stack developer might appear herculean at first. But once you master these six steps, you are on your way to getting there.
Why Hiring Top Web Developers is a Good Idea  DevOps.comWeb development is one of the most valuable activities of any company, especially tech companies and web design agencies.
Learn Web Development For Just $15 With This Amazing Complete Web Developer Course 2.0 – Limited Offer  WccftechLearn web development with Robert Percival. Get the Complete Web Developer Course 2.0 for an amazing discount offer and start a career!
Top 6 Web Development Trends that will Dominate 2019  ToolboxWhen it comes to web development you are bound to experience constant changes and updates in the designs every year. In fact, the updates and trends are ...
Tips to Hire a Web Developer with Required Skills in 2019  Customer ThinkWeb development is serious business. In recent years, it has had a great impetus and is one of the major priorities for every business irrespective of its size and ...
Ten Basic Things Every Web Developer Should Know  HTML Goodiesten things you need to know if you plan to build a web site.
8 Tips To Start Building User-friendly eCommerce Website Development  Customer ThinkeCommerce, a big-time word which we hear every day. Whether, big or a small enterprise, eCommerce website development is an unsaid must for your ...
Yale announces Web Development “Bootcamp”  Yale Daily NewsYalies interested in programming will be able to take a 10-week web development boot camp this summer for credit, offered as a part of Yale Summer Session, ...
Django vs Flask: A Look At The Two Popular Python Web Frameworks  Analytics India MagazineIn this article, we look at two of the best frameworks, Django and Flask that can be used by Python programmers and developers.
Learn the tricks of web development in 44 hours  Android AuthoritySpending just $29 could be the start of your future in web development. The minimum outcome is that you learn an interesting and marketable new skill. If things ...
Internet born with two big flaws, says founding “father” Cerf  The HeraldLOS ANGELES. - The Internet was born flawed. But if it hadn't been, it might not have grown into the worldwide phenomenon it's become.
Job vacancy: Marketing and web development project manager  International Association of Athletics FederationsThe IAAF is seeking a marketing and web development project manager at its Monaco headquarters. Reporting to the chief information officer, the marketing and ...
Full stack puts Bellevue University web development students ahead of the pack  Omaha World-HeraldStudents learn to design, code, implement and maintain an interactive website on their own.
YouTube for Android gets a new UI and voice command for a better-customized interface  TechGenYZNeed to learn web design and development? No worries, there are millions of tutorials, and videos available on YouTube for people to learn new skills or to ...
4 Ways to Ensure Effective Web Development  Business 2 CommunityWhen it comes to building a new website, many businesses choose to focus predominantly on the design aspect of the project when approaching agencies to ...
Image Management 101: The Web Developer’s Guide  DevOps.comHow understanding the user experience can help web developers in managing images effectively Online experiences have in many ways supplanted in-person ...
What is Document Object Model (DOM) in Web Development?  TechnotificationBrowsers know how to convert the tags of the HTML into a tree with the help of DOM. Here is all you need to know about Document Object Model.
Why has Python Failed To Penetrate The Enterprise Development Sector?  Analytics India MagazinePython has built considerable buzz in the large-scale web development space, but despite its popularity, it has failed to penetrate enterprise development.
Best Web Frameworks in Popular Programming Languages  TechnotificationWeb frameworks simplify the whole web development process. The big question is: Which are the best web development frameworks to use in 2019?
This web developer course is down by over £150  MashableProgress from a junior to senior web developer for just £11.99 with this course.
Understand Web Development in Less than 1 Hour  SitePointThis article explains what web development is, by exploring how it started and how it evolved.
Netlify just got $30 million to change the way developers build websites  TechCrunchNetlify wants to revolutionize the way developers build websites, abstracting away the web server and breaking web sites into microservices, making the process ...
Yale, Flatiron School create web development bootcamp for summer session  Yale NewsYale Summer Session is collaborating with Flatiron School to offer a Web Development Bootcamp for Summer 2019, which will carry two Yale College credits, ...
How Website Development Has Changed Over the Years (infographic)  Digital Information WorldWebsite design has come a long way in a relatively short time. From zeros and ones to lines of code to intuitive website builders, designing for the web has ...
“ChromeOS is ready for web development” – A talk by Dan Dascalescu at the Chrome Web Summit 2018  Packt HubAt the Chrome Web Summit 2018, Dan Dascalescu, partner developer advocate at Google provided a high-level overview of ChromeOS and discussed ...
Top 5 Web Development Startups of 2018  BBN TimesTech Start-ups are the most trending things among investors and entrepreneurs due to the serious innovations they offer. Who knows which upcoming tech ...
Which Cloud Solution Is Best For Your Web App Development  MobileAppDailyLearn more about which cloud solution is most suitable for your web app development and what is the right way to choose an efficient cloud *service* .
Best web development tools of 2018  TechRadarGrab the right tools to get web development done without breaking a sweat.
Some of the Best IDEs and Text Editors for Web Development  TechnotificationThe right IDEs or a Text editor will be a huge help during coding. It'll help you be faster, accurate and productive for web development.
Is Agile Web Development All It's Cracked Up to Be?  EContentWhile AWD offers several advantages over waterfall and other methodologies, it has its limitations too. Whether you're preparing to take your first iterative plunge ...
How to learn web development online  Tech AdvisorWeb development is one of the 21st Century's most sought-after skills, but with so much to learn it can be quite daunting. After all, coding is quite literally like ...
Use Rust for web development [Tutorial]  Packt HubRust is efficient and has well thought web-oriented frameworks, making it viable for web development. In this article, we'll see how Rust can be used for web ...
How online learning platforms are bridging demand-supply gap in IT manpower requirement  YourStoryThere is a skill shortage in the IT industry, the global shortage to grow from 7 million to 23 million by 2022, 1.2 million in India set to increase to 6.5.
5 examples of Artificial Intelligence in Web apps  Packt HubThis article highlights the five key areas where web apps are employing Artificial intelligence to automate some part of their system.
Learn the Essentials of Web Development with This eBook Bundle  Interesting EngineeringThrough hands-on, real-world instruction, this course teaches you about everything from development essentials like JavaScript, Java, and C++ to interview ...
5 Best Online Front-end Web Development Playgrounds  Technotification5 best online front-end web dev playgrounds to test code. As soon as the code is written, the test-ready output is delivered within seconds.
Break into the field of web development with these discounted e-books  MashableThe barriers to breaking into the web development field are lower than ever. You no longer need to break the bank, quit your job, and enroll in a university to ...
Open Source Dart 2 Revamp Focuses on Mobile, Web Development  ADT MagazineAfter a nearly eight-month pre-release preview, the open source Dart 2 programming language has emerged as a stable release that includes many breaking ...
Cloudflare IPFS Gateway boosts decentralized website development  ZDNetThe new solution enables developers to create websites which are based on peer-to-peer, distributed technologies.
Straight From the Tech Experts: What Will the Defining Feature of Web 3.0 Be?  TechopediaThe jump from Web 1.0 to 2.0 gave us a more easily accessible, interactive web. So what can we look forward to with Web 3.0? Experts share their thoughts.
Why choose Angular for Web Development - WhaTech  WhaTechAngular is well known for developing robust and adaptable Single Page Applications (SPA). The Application structure is developed in JavaScript and uses ...
Web developers vs. data scientists: Who rules the Python world?  JAXenterWhere does Python's expansion come from? Who's using it more: web developers or data scientists? Python Developers Survey 2017 results are in!
Sign up for a web developer bootcamp class online during this course sale and pay just £12  MashableWeb development sounds like something that should be kept to the confines of tech support HQ — clouded in mystery and something us mere mortals cannot ...
Conversational AI in 2018: An arms race of new products, acquisitions, and more  Packt HubConversational AI is one of the most talked about applications of artificial intelligence. Let's see what all the advances we saw in this field in 2018.
Best Web Certifications  Business News DailyCertifications from Adobe, Google, Microsoft and Zend will all give you the skills you need to be a competent web designer, developer and SEO specialist.
Uber introduces Fusion.js, a plugin-based web development framework for high performance apps  Packt HubUber introduces Fusion.js, a brand new web framework based on a plugin-based architecture with module reloading, and bundle splitting support.
Why everyone should know programming  Business TodayMost people tend to assume that everybody with an interest in programming wishes to become a computer scientist. It is precisely this thought that Dr Chuck is ...
Seven Reasons Why A Website's Front-End And Back-End Should Be Kept Separate  ForbesHere is why it may be a good idea to have a separate back-end and front-end for a website.
A web developer's perspective: Edge's move to Chromium will increase productivity, but raises long-term concerns OnMSFT.com  OnMSFTLast week Microsoft confirmed the unprecedented news that it's rebuilding its Edge web browser atop the Chromium open-source rendering engine. It spells the ...
Pay What You Want for the Ultimate Web Developer Bundle  InverseWeb Development is a vital and lucrative skill. You'll learn the ins and outs of everything. Domain design, top info and tips from expert programmers, ...

Do You Need a Web Database?

Does My Web Site Require A Web Database?If your web... Read More

CSS - Maximum Benefits

What is CSS?CSS is a simple file which controls the... Read More

Building eCommerce Websites that Work - Part 3

An interesting eCommerce success factor that isn't precisely overlooked, but... Read More

The Most Important Aspect of Writing Web Copy

There is an ongoing debate about web copy. Some say... Read More

Using Psychology Easily on Your Website to Make More Sales!

Psychology is a long word which everyone thinks, "no, that's... Read More

Top 5 Webmaster Tools You Can Pick Up For Pennies

1. SiteSpinner V2 - On Sale www.deprice.com/sitespinner.htmSiteSpinner is a user-friendly... Read More

Why You Really Need Your Own Web Page In-order To Make Online Business!

How many Web Sites did you stumble over telling you... Read More

Live Support from Your Website? Can You Do It for Free?

I'm a freelance programmer and somehow I managed to get... Read More

Ever Wondered What Challenges Other People With Their Web Site?

Have you ever wondered what challenges are faced by other... Read More

CPanel Fantastico - Features and Benefits

Fantastico is a 3rd-party cPanel add-on and can be purchased... Read More

Website Strategy!

A website lets you put your products in front of... Read More

Does Your Business Really Need A Website?

Website, website, website, everyone says you need one. But do... Read More

A Web Site for Your Small Business: How to Set Up a Website

Your web site will be your window to the world.... Read More

Unlocking the Power of Your Website!

Why do some web sites reap huge benefits while others... Read More

Benefits Of An Accessible Website: Part 1 - Increase In Reach

The DDA (Disability Discrimination Act) states that service providers must... Read More

In Business? 10 Reasons Why You Need a Website -- Now!

1) Word of Mouth The single most powerful form of... Read More

5 Tips To Supercharge Your Website Sales Copy

The art of turning website visitors into paying customers depends... Read More

Six Basic Reasons Why Visitors Stay On Your Web Site

1. The first page appears quickly.It's a good way to... Read More

Adding Word Rich Content to Your Website

You have permission to publish this article electronically, in print,... Read More

Make Your Own Website - General Website Design Tips

Wow, we`ve already taken a domain and chosen a web... Read More

The Problem with Automated Accessibility Testing Tools

An automated accessibility tool is a piece of software which... Read More

Successful Web Development: 10 Key Elements

There are many elements that are key to successful web... Read More

Is Your Web Site Talking to Your Customer?

A while ago one of my clients approached me and... Read More

Ten Quick Tests To Check Your Website For Accessibility

The Disability Discrimination Act says that websites must be made... Read More

5 Essential Traits Of A Home Business Website

So you've decided to start an online work at home... Read More