Skip to content

Latest commit

 

History

History
106 lines (56 loc) · 5.94 KB

formats.md

File metadata and controls

106 lines (56 loc) · 5.94 KB

Image Formats


These formats represent images as arrangements of pixels. They are the most common way to store and transmit images due to their flexibility and versatility. Raster-based formats are well suited for photographs, but need more care in terms of scientific and engineering contexts because of their "pixel-based" nature.

Some of the most common raster-based formats are: JPEG/JFIF, JPEG 2000, Exif, TIFF, GIF, BMP, PNG, PPM/PGM/PBM/PNM, WebP, HDR, HEIF, BAT, BPG



This format is popular because of it's portability and low file size. It allows an 8bit palette per image (frame in animations), and uses the LZW losless compressing technique to reduce file-size (patented at the time). This format is well suited for sharp and low-colored images (such as logos), but not suited for images that need to display more than 256 colors at the same time (even for images/videos with lower than 256 colors this might not be a good option unless the color palette is optimized as described in this link).

Uses the lossy discrete cosine transform to achieve high compression rates. This format is good for digital photographs as it generally allows compression rates of about 10:1 without any obvious quality loss. In terms of scientific visualizations, however, JPEG is often a bad alternative due to the artifacts generated by the compression (specially in high contrast region of the image).



Portable network graphics was created as a replacement for GIF images without a patent. This format allows only RGB spaces and is designed for easy transferring of lossless non-professional images on the internet. It uses a two stage compression method (filtering and compression).

Tagged Image File Format can be used as a container for JPEGs or lossless raster information along with vector data about boundaries, and croppings. This format was created to provide a common ground for scanners in mid 80's but has been extended and is popular in photography, and publishing industry.

One of the advantages of TIFF over JPEG is that it allows lossless compression algorithms such as: PackBits, LZW, ZIP, amongst others.


Vector graphics are based on 2d points that define the path along which lines are drawn (polygons or curves). Although less popular, these type of graphics provide much better sharpness in high contrast regions. Therefore, they are much better suited for the transferring of scientific and engineering graphics.

The most common vector-based formats are: CGM, Gerber format, SVG



SVG

XML-based 2d vector image format. This file type is supported by all major browsers for the online exchange of graphics.


These formats can contain both raster and vector elements within their structure.

Some common compound formats are: EPS, PDF, PS, PICT, WMF/EMF, SWF, XAML

PDF

The most commonly used compound format. It was originally developed by Adobe, but since 2008 it has become open for development. In portable document format files images can be stored both as rasters or vectors (through the use of Bézier curves).

PS

Created by Adobe, this format was developed as a vector-based alternative for printing documents and was used as the basis to develop PDF standards.

EPS

The encapsulated postscript is a document which contains vector information of the image to be stored (in postscript form), along with a bitmap representation for on-screen preview.


The aspect ratio of images and videos is also an important factor to take into account when generating graphics. This is because we can take into account the whole available space alloted to us. For example, when thinking about creating a video out of graphics, we can generate the frames in a standard aspect ratio to avoid black bands on the edges of online resources such as Youtube.

Although generally used interchangeably, screen resolution and aspec ratio are different concepts. The screen resolution is the number of width and height pixels that the screen/projector can show, whilst the aspect ratio is the ratio between the two quantities.




More information

For a more thorough comparison of various images formats look at this link.