Posted inBlog

Find Out in Which Format to Save Your Files

Which Format to Save Your Files

Usually when we save a graphic file, usually a photo, we ask ourselves what would be the best format: TIFF, JPEG, GIF, PNG… We usually use the one we usually receive and we don’t ask ourselves what’s behind each acronym. Today we want you to know that there are subtle and big differences between one format and another.

TIFF

TIFF files were designed in the mid-1980s by the company Aldus – what memories! – to store high-resolution images using tags, although they now belong to Adobe, which merged with Aldus in 1994.

The most important thing about this format is that it is a lossless format. That is, we can open and close the document, save it as many times as we want and it will remain unaltered. They can also be compressed using several different algorithms without losing quality.

Another advantage of this format is its implementation. TIFF files can be manipulated by practically any photo editing or design application on the market. Currently, they can also be stored with layers, it is not necessary to use the PSD format for this.

JPEG

It is currently the king, but it is not necessarily the best option. Before the advent of the internet, everyone worked in high resolution, so using compressed file formats was almost a necessity for transport since the devices were not very large in memory.

With the appearance of the web. It was necessary to be able to use images without the heavy memory load of high resolution for printing and to be able to transmit them with the meagre connections of that time.

The Joint Photographic Experts Group (JPEG), formed in 1986, set out to create the algorithm to make this possible and in 1992 presented the standard for image compression and encoding. The great success was the release of the algorithm as free software that meant the implementation in numerous companies that manage images and therefore did not have to pay licenses or patents.

Its basic operation is simple to understand, although complex at the same time, and it is important to understand it to know if it is convenient for us to use it or not.

When we talked about the TIFF format, we said that it is a lossless format. Lossless means that every single pixel in an image is saved every time exactly as they are and where they are. In the case of the JPEG format this is not the case. It is a lossy format.

In the JPEG format, when we save an image, the algorithm tracks each line of pixels and makes decisions about it. When it finds two contiguous pixels on a line that are very similar in their colorimetry values, it decides which pixel to save and which to delete.

When the image is opened again, that pixel that was very similar to the other will no longer be there and only another ‘invented’ pixel or the same one that was next to it in the original image will be placed in its place.

We can see it in the three images above. As can be seen in the detail in the first uncompressed one, blue pixels appear next to the green band. But in the successive compressions these pixels disappear. The nuances disappear. Even the lightest diagonal band that joined the green area is now separated.

The same is repeated in each of the pixel lines of each image. This results in considerable memory savings. But what’s the price? When we are asked about the quality of the file at the time of saving, it is there that we are deciding what is the level of substitution we want.

If we decide on a very low quality, what we are doing is expanding the range of ‘similar’ pixels that will eliminate compression. Which will inevitably make you lose nuances of the image and therefore quality.

Keep in mind that even if we say ‘maximum quality’ when saving a jpeg we are still having a loss. A very small loss and that in most cases we will not differentiate no matter how hard we try. That is, it can be saved for printing in JPEG at maximum resolution and our photos will be printed without problems.

The JPEG format can be destructive. If we have an image saved in that format and we open it and save it again in JPEG, and so on, we will notice that little by little the image fades and flattens. Try it and you’ll see.

GIF

Is an image format for bitmaps up to 256 colors, 8 bits. In other words, the image can only be composed with 256 shades of color and therefore limits its use or quality. At the time it was a very useful format as it used an LZW compression algorithm that allowed the more or less fast download of images on the slow connections of the late 80s and early 90s.

The quality, if the level of color and compression is fine-tuned, can be very good. Its most common characteristic is the appearance of small dots or granules in the image.

Its great functionality is animation. It is a format that allows you to include different screens within the same file and thus generate animation. Currently it is the format of internet banners with animation.

Another very interesting feature is the possibility of making transparencies. One of the 256 pixels is assigned the transparency function and enables integration with backgrounds in a much more harmonious way.

Unisys, owner of the patent for the LZW algorithm used in the GIF format, demanded for years the payment of the rights for its use. Compude, when developing the format, did not know that the LZW algorithm was covered by a patent. Because of this, any program capable of opening or saving GIF files compressed with LZW had to meet their demands.

PNG

This format arose from the impossibility of using GIFs if the LZW compression license was not paid to Unisys. Which in 1995 required the payment of its format to the different companies that used it without going through the checkout.

The format is similar to GIF and JPEG, but with nuances. It is a format with a bitmap color palette like GIF but improved since it has up to 24 bits for the 8 bits of the GIF. And on the other hand, it acts better in terms of compression, in some situations, than the JPEG format. It is a lossless format but with compression.

PNG in images with continuous masses of color performs better than JPEG because it does not generate the typical pixel noise or dirt that happens when decompressing a JPEG file. Notice in the shadow of the image above. It is especially suitable in illustrations with masses of color or even in some images with very large areas of color (skies, portraits with continuous backgrounds…) also in icons or vector graphics converted to bitmaps.

A particularity that it inherits from GIF is the possibility of making transparencies. Something that expands its range of action in relation to JPEG. On many occasions we want to place a logo, symbol or typography with a transparent background and the PNG option is the best option.

Sometimes, the difference between JPEG and PNG is barely noticeable, you have to try both versions and for this Photoshop in its export for web option, allows us to visualize in a comparative way before saving the file.