What is GIF, JPEG, PNG (Image)
Miscellanea / / July 04, 2021
By Guillem Alsina González, in Jun. 2016
The representation of images through computers requires two basic elements: the hardware adequate, and the software suitable.
The first has been somewhat trivial for many years, and the second too, but the latter still holds something a bit confusing for users: there are different ways to save images, different formats known by their acronyms that have become famous: JPEG, GIF, PNG or RAW among others.
Higher fidelity, less space
A Format image (which can be a photograph or a He drew) consists of a certain way of saving the information that corresponds to the image and allows generate it, so that it occupies the least possible space and is as reliable as possible to the reality.
If today's computers have hard drives and other media storage brimming with Gigabytes, and the internet connections are so fast that we can watch movies directly online without having to download them, why do we need to decrease the size of the images?
Fruit of a historical necessity
The answer to this question is simple: things have not always been this way. There was a time, not that long ago, when a computer with a HDD of 20 megabytes (yes, you read that correctly, not gigabytes, if not megabytes) was considered one of the largest storage available, and its price was not available to everyone.
Nor did Internet connections start out as fast as fiber optic cable, and Internet connections The first ones that we could enjoy at home took a few seconds to download a very simple.
It is within this framework that, and to facilitate its exchange/ transfer and storage, image formats are born.
Based on mathematical algorithms
The key to any graphic format is based on a algorithm mathematical. Instead of saving the information about each color point, what is done is to group areas in which all the points have the same color and tone and, from here, a formula is developed to reproduce said area.
What is stored is the mathematical information, whose volume is considerably less than that of saving the information of each pixel (point) that composes the image individually, an especially interesting saving the larger the image (greater resolution).
Image formats with specific functionalities
Throughout these years, new algorithms have been created and existing ones have been improved. There are many image formats, and some offer particular features that make them very useful for certain tasks.
This is the case of PNG, born for the web, or GIF, which allows you to save an animation (like a small movie of one or two seconds) in a single file.
It is still curious that, many years later, Apple has launched the Live Photos format that, precisely, it consists of a small video of a few seconds, but which is stored as a picture. An idea similar to the GIF but improved.
Jpeg
The "star" of compression formats for its wide diffusion and use in all kinds of devices and applications. It is the format that, by default, mobile phones and home cameras use to capture images, and that reproduces any electronic device capable of displaying images such as a television, tablet or a computer.
Created by the Joint Photographic Experts Group, a group of photography experts, it uses a lossy compression algorithm, for which it reduces the size of the resulting file considerably, but paying the price of losing some information from the image resulting.
This information is barely perceptible globally by the observer, which compensates for this loss.
PNG
Born as an alternative to the GIF format for use on the Internet, it allows (like that one) to define areas of the transparent images, with which and when superimposed on a colored background, these areas will show the color that is below.
It also exceeds the 256 color limit of the GIF image and supports interlaced images, so we start to see the image rendered in parts and we can get an idea of the whole before it has finished loading, something that others do not support formats.
GIF
Created by CompuServe, it uses the highly efficient LZW algorithm. However, it has a problem: it works for 256-color images (and it works really well), but for those images in which we want to show a greater range of colors, it is not ideal.
Widely used in the early days of the great expansion of the Internet thanks to the fact that it allowed to create very light images, it then fell almost into oblivion to begin to come back strongly thanks to memes due to another of its characteristics: the possibility of containing animations.
Added in the GIF89a specification (after the birth of the original format), it is nothing more than the possibility of having several images within a single file, each one being as a frame of a small movie and giving them a drawing time between each one.
The end result is something very similar to a movement.
BMP
Who remembers this? Created by Microsoft and popularized by its vector drawing programs, it was used by many operating systems in their icons.
Already surpassed by other alternatives, it has been quite forgotten in its uses for the end user. One of its disadvantages is that it does not use compression, so the size of the images generated is larger than with other alternatives.
RAW
This I have left for the end because it contradicts a bit everything explained so far; Let me explain: it contains the maximum information about each point of the image, with lossless compression of the information.
It is the one commonly used by professional photographers, as it offers unparalleled quality, since than other formats that compress with some loss of information, always slightly degrade the picture.
This quality comes at a price: the large size they occupy on disk. Professional photographers typically have a large amount of storage in their facilities.
Photos: iStock - Kristtaps / LaraBelova
Themes in GIF, JPEG, PNG (Image)