File Compression and Types

File compression
File compression is a process of “packaging” a file (or files) to use less disk space. Compression works by minimizing redundancy in a file’s code. Compression software allows you to take many files and compress them into one file, which is smaller than the combined size of the originals.

Compression – Loss Less vs Lossy

LOSSY

Two forms of compression schemes shrink the large size of graphic files:

LossLess

This compression technique reduces the size of a file without sacrificing any original data. It is the most common and looks for areas containing pixels of the same value and encodes the area.

In lossless compression, the expanded or restored file is an exact replica of the original file before it was compressed.

  • breaks a file into a “smaller” form
  • to be transferred or stored
  • and then puts it back together

Lossy

This compression is used only in the JPEG file format and actually loses information when saving and compressing a file. Lossy compression compresses the file at ten times than that of Loss Less compression.

It is used for graphics files in which the loss of data – such as information about some of the graphic’s several million colors – isn’t noticeable.

Example:

  • If the picture had a lot of blue sky, the program would pick one color of blue that could be used for every pixel.
  • Then, the program rewrites the file so that the value for every sky pixel refers back to this information.
  • If the compression scheme works well, you won’t notice the change, but the file size will be significantly reduced.
  • You can’t get the original file back after it has been compressed. You’re stuck with the compression program’s reinterpretation of the original.

What is Lossy Compression and how do JPEG’s work?

 

Compare file types. Which files should you use when?

PNG, JEPG and GIF

JPEG vs RAW

 

Check out this infographic from datascience.berkeley.edu

Data-Size-Matters-IG

http://datascience.berkeley.edu/big-data-infographic/

 

 

Nuts01

GIF

  • GIF is preferred for images with large areas of solid colors, such as logos and text as graphics.
  • GIF does not compress your pictures, which mean that they do not loose any image quality – but files are consequently large.
  • GIF files can either be in grayscale or RGB color spaces.
  • GIF files can only store and display 256 colors in the RGB or indexed color gamut
  • GIF files unsuitable for use in a print production workflow, but highly desirable in a Web design situation.

Two main advantages with GIF over the JPG format:

  • Can be used for  pseudo animation
  • Can have transparent backgrounds.

JPEG / JPG

  • JPEG is expected to become the international standard for encoding digitized photographs.
  • JPEG’s greatest difference from all other file formats is that it uses Lossy compression. – thus you loose some image quality.
  • If you start with a JPEG file that needs edits, save it as an EPS or TIF file. This way, additional information will not get lost and the quality of the original JPEG image will be maintained.
  • JPEG format supports 24-bits images or up to 16 million colors through the RGB, CMYK, and grayscale color spaces.
  • JPEG images is supported in HTML and Web applications.
  • No support for transparency in a JPEG file.

PNG

  • PNG use lossless compression of data … the format compress the images so that you will not be able to detect degradation of quality.
  • PNG file can support both 8-bit or 24-bit colors
  • PNG ‘s can support and control transparency
  • PNG file is not good for print because it doesn’t support  CMYK, and there can be no color separations.
  • But can you animate a PNG? 

TIFF

  • Optimal choice since the file format works on both MAC and PC platforms, supports almost any picture bit depth and allow for various form of compression.
  • Raster-based file that supports the following: RGB, CMYK, Grayscale, Lab, and Indexed color.
  • Multiple compression schemes including no compression. Can do both Lossless and Lossy.

PDF

  • PDF is an open file format which makes the PDF format suitable for sharing.
  • When you use PDF files to communicate, you don’t have to worry about whether people have the same software you used to create your originals.
  • You can view and interact with PDFs on virtually any platform, including Windows®, Mac OS, and mobile platforms including Android™ and iOS for iPhone and iPad.
  • PDFs look just like the originals and preserve all the source file information, even when text, drawings, videos, audio, 3D maps, full-color graphics, photos, and business logic are combined in a single file or PDF Portfolio.
  • When you need to find a particular word or phrase in a PDF, it’s easy to search text and metadata, including scanned text that was converted using optical character recognition (OCR) technology.

Sources:

http://www.optimalprint.com/file-format

http://www.adobe.com/products/acrobat/adobepdf.html

http://en.wikipedia.org/wiki/Tagged_Image_File_Format#Compression

http://en.wikipedia.org/wiki/Image_file_formats

Leave a comment