Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why are there so many different image formats on the Web?

different formats GIF image jpg web
0
Posted

Why are there so many different image formats on the Web?

0

It certainly is true that there are lots of different image formats on the web — Just at How Stuff Works, we use 6 different image formats: • GIF files • JPEG files • Animated GIF files • MPEG files • Shockwave files • NxView files The two most common by far are GIF and JPEG files. Both of these formats encode static (as opposed to animated) bitmap images . In a bitmap image, the image file has to define the exact color of every pixel in the image. For example, imagine a typical bitmap on the web that is 400 by 400 pixels. To define this image, you would need 24 bits per pixel for 160,000 pixels, or 480,000 bytes. That would be a huge image file, so both the GIF and JPG formats compress the image in different ways. In a GIF image, the number of colors is reduced to 256 and then “runs” of same-color pixels are encoded in a color+numberOfPixels format. For example, if there are 100 pixels on a line with the color 41, the image file stores the color (41) and the length of the run (100).

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123