Image file format
An image file format is a
Raster formats are for
Image files are composed of digital data in one of these formats so that the data can be displayed on a digital (computer) display or printed out using a printer. A common method for displaying digital image information has historically been rasterization.
Image file sizes
The size of raster image files is positively correlated with the number of pixels in the image and the color depth (bits per pixel). Images can be compressed in various ways, however. A compression algorithm stores either an exact representation or an approximation of the original image in a smaller number of bytes that can be expanded back to its uncompressed form with a corresponding decompression algorithm. Images with the same number of pixels and color depth can have very different compressed file size. Considering exactly the same compression, number of pixels, and color depth for two images, different graphical complexity of the original images may also result in very different file sizes after compression due to the nature of compression algorithms. With some compression formats, images that are less complex may result in smaller compressed file sizes. This characteristic sometimes results in a smaller file size for some lossless formats than lossy formats. For example, graphically simple images (i.e. images with large continuous regions like line art or animation sequences) may be losslessly compressed into a GIF or PNG format and result in a smaller file size than a lossy JPEG format.
For example, a 640 × 480 pixel image with 24-bit color would occupy almost a megabyte of space:
- 640 × 480 × 24 = 7,372,800 bits = 921,600 bytes = 900 KiB
With vector images, the file size increases only with the addition of more vectors.
Image file compression
There are two types of
Lossless compression algorithms reduce file size while preserving a perfect copy of the original uncompressed image. Lossless compression generally, but not always, results in larger files than lossy compression. Lossless compression should be used to avoid accumulating stages of re-compression when editing images.
Lossy compression algorithms preserve a representation of the original uncompressed image that may appear to be a perfect copy, but is not a perfect copy. Often lossy compression is able to achieve smaller file sizes than lossless compression. Most lossy compression algorithms allow for variable compression that trades image quality for file size.
Major graphic file formats
Including proprietary types, there are hundreds of image file types. The PNG, JPEG, and GIF formats are most often used to display images on the Internet. Some of these graphic formats are listed and briefly described below, separated into the two main families of graphics: raster and vector. Raster images are further divided into formats primarily aimed at (web) delivery (i.e. supporting relatively strong compression) versus formats primarily aimed at authoring or interchange (uncompressed or only relatively weak compression).
In addition to straight image formats,
Raster formats (2D)
Delivery formats
JPEG
GIF
The GIF (
PNG
The PNG (
Compared to JPEG, PNG excels when the image has large, uniformly colored areas. Even for photographs – where JPEG is often the choice for final distribution since its lossy compression typically yields smaller file sizes – PNG is still well-suited to storing images during the editing process because of its lossless compression.
PNG provides a patent-free replacement for GIF (though GIF is itself now patent-free) and can also replace many common uses of TIFF. Indexed-color, grayscale, and truecolor images are supported, plus an optional alpha channel. The Adam7 interlacing allows an early preview, even when only a small percentage of the image data has been transmitted — useful in online viewing applications like web browsers. PNG can store gamma and chromaticity data, as well as ICC profiles, for accurate color matching on heterogeneous platforms.
Animated formats derived from PNG are MNG and APNG, which is backwards compatible with PNG and supported by most browsers.
JPEG 2000
JPEG 2000 is a compression standard enabling both lossless and lossy storage. The compression methods used are different from the ones in standard JFIF/JPEG; they improve quality and compression ratios, but also require more computational power to process. JPEG 2000 also adds features that are missing in JPEG. It is not nearly as common as JPEG, but it is used currently in professional movie editing and distribution (some digital cinemas, for example, use JPEG 2000 for individual movie frames).
WebP
WebP is an open image format released in 2010 that uses both lossless and lossy compression. It was designed by Google to reduce image file size to speed up web page loading: its principal purpose is to supersede JPEG as the primary format for photographs on the web. WebP is based on VP8's intra-frame coding and uses a container based on RIFF.
In 2011,[3] Google added an "Extended File Format" allowing WebP support for animation, ICC profile, XMP and Exif metadata, and tiling.
The support for animation allowed for converting older animated GIFs to animated WebP.
The WebP container (i.e., RIFF container for WebP) allows feature support over and above the basic use case of WebP (i.e., a file containing a single image encoded as a VP8 key frame). The WebP container provides additional support for:
- Lossless compression – An image can be losslessly compressed, using the WebP Lossless Format.
- Metadata – An image may have metadata stored in EXIF or XMP formats.
- Transparency – An image may have transparency, i.e., an alpha channel.
- Color Profile – An image may have an embedded ICC profile as described by the International Color Consortium.
- Animation – An image may have multiple frames with pauses between them, making it an animation.[4]
HDR raster formats
Most typical raster formats cannot store
JPEG XT Part 7 includes support for encoding floating point HDR images in the base 8-bit JPEG file using enhancement layers encoded with four profiles (A-D); Profile A is based on the RGBE format and Profile B on the XDepth format from Trellis Management.
HEIF
The High Efficiency Image File Format (HEIF) is an image container format that was standardized by MPEG on the basis of the ISO base media file format. While HEIF can be used with any image compression format, the HEIF standard specifies the storage of HEVC intra-coded images and HEVC-coded image sequences taking advantage of inter-picture prediction.
AVIF
JPEG XL
JPEG XL is a royalty-free raster-graphics file format that supports both lossy and lossless compression. It supports reversible recompression of existing JPEG files, as well as high-precision HDR (up to 32-bit floating point values per pixel component). It is designed to be usable for both delivery and authoring use cases.
Authoring / Interchange formats
TIFF
The TIFF (
BMP
The BMP file format (Windows bitmap) is a raster-based device-independent file type designed in the early days of computer graphics. It handles graphic files within the Microsoft Windows OS. Typically, BMP files are uncompressed, and therefore large and lossless; their advantage is their simple structure and wide acceptance in Windows programs.
PPM, PGM, PBM, and PNM
Container formats of raster graphics editors
These image formats contain various images, layers and objects, out of which the final image is to be composed
- AFPhoto (Affinity Photo Document)
- CD5 (Chasys Draw Image)
- CLIP (Clip Studio Paint)
- CPT(Corel Photo Paint)
- KRA (Krita)
- MDP (Medibang and FireAlpaca)
- PDN(Paint Dot Net)
- PLD (PhotoLine Document)
- PSD (Adobe PhotoShop Document)
- PSP(Corel Paint Shop Pro)
- SAI (Paint Tool SAI)
- XCF (eXperimental Computing Facility format) — native GIMP format
Other raster formats
- BPG (Better Portable Graphics) — an image format from 2014. Its purpose is to replace JPEG when quality or file size is an issue. To that end, it features a high data compression ratio, based on a subset of the HEVC video compression standard, including lossless compression. In addition, it supports various meta data (such as EXIF).
- DEEP — IFF-style format used by TVPaint
- DRW (Drawn File)
- ECW (Enhanced Compression Wavelet)
- FITS (Flexible Image Transport System)
- FLIF (Free Lossless Image Format) — a discontinued lossless image format which claims to outperform PNG, lossless WebP, lossless BPG and lossless JPEG 2000 in terms of compression ratio. It uses the MANIAC (Meta-Adaptive Near-zero Integer Arithmetic Coding) entropy encoding algorithm, a variant of the CABAC(context-adaptive binary arithmetic coding) entropy encoding algorithm.
- PNG)
- ILBM — IFF-style format for up to 32 bit in planar representation, plus optional 64 bit extensions
- IMG(ERDAS IMAGINE Image)
- IMG (Graphics Environment Manager (GEM) image file) — planar, run-length encoded
- JPEG XR — JPEG standard based on Microsoft HD Photo
- Layered Image File Format — for microscope image processing
- Nrrd (Nearly raw raster data)
- Netpbm family
- PCX (PiCture eXchange) — obsolete
- PGF (Progressive Graphics File)
- PLBM (Planar Bitmap) — proprietary Amiga format
- SGI (Silicon Graphics Image) — native raster graphics file format for Silicon Graphics workstations
- SID (multiresolution seamless image database, MrSID)
- Sun Raster — obsolete
- TGA (TARGA) — obsolete
- JPLimage transport format
- XISF (Extensible Image Serialization Format)
Vector formats
As opposed to the raster image formats above (where the data describes the characteristics of each individual pixel), vector image formats contain a geometric description which can be rendered smoothly at any desired display size.
At some point, all vector graphics must be rasterized in order to be displayed on digital monitors. Vector images may also be displayed with analog
CGM
CGM (
Gerber format (RS-274X)
The Gerber format (aka Extended Gerber, RS-274X) is a 2D bi-level image description format developed by Ucamco. It is the de facto standard format for printed circuit board or PCB software.[5]
SVG
SVG (
Other 2D vector formats
- AFDesign (Affinity Designer document)
- AI (Adobe Illustrator Artwork) — proprietary file format developed by Adobe Systems
- CDR — proprietary format for CorelDRAW vector graphics editor
- !DRAW — a native vector graphic format (in several backward compatible versions) for the RISC-OScomputer system begun by Acorn in the mid-1980s and still present on that platform today
- DrawingML — used in Office Open XML documents
- GEM — metafiles interpreted and written by the Graphics Environment ManagerVDI subsystem
- GLE (Graphics Layout Engine) — graphics scripting language
- HP-GL (Hewlett-Packard Graphics Language) — introduced on Hewlett-Packard plotters, but generalized into a printer language
- HVIF (Haiku Vector Icon Format)
- Lottie — format for vector graphics animation
- MathML (Mathematical Markup Language) — an application of XML for describing mathematical notations
- NAPLPS (North American Presentation Layer Protocol Syntax)
- ODG (OpenDocument Graphics)
- PGML (recommendation
- PSTricks and PGF/TikZ are languages for creating graphics in TeX documents
- QCC — used by Quilt Manager (by Quilt EZ) for designing quilts
- ReGIS (Remote Graphic Instruction Set) — used by DEC computer terminals
- Remote imaging protocol— system for sending vector graphics over low-bandwidth links
- TinyVG — binary, simpler alternative to SVG[6]
- VML (Vector Markup Language) — obsolete XML-based format
- Xar — format used in vector applications from Xara
- XPS (XML Paper Specification) — page description language and a fixed-document format
3D vector formats
This section may contain material not related to the topic of the article and should be moved to List_of_file_formats#Computer-aided_design instead. (May 2021) ) |
- AMF– Additive Manufacturing File Format
- Asymptote – A language that lifts TeX to 3D.
- .blend– Blender
- COLLADA
- DGN
- .dwf
- .dwg
- .dxf
- eDrawings
- .flt – OpenFlight
- FVRML – and FX3D, function-based extensions of VRML and X3D
- glTF - OpenGL Transfer Format
- HSF
- IGES
- IMML – Immersive Media Markup Language
- IPA
- JT
- .MA (Maya ASCII format)
- .MB (Maya Binary format)
- .OBJ Wavefront
- OpenGEX– Open Game Engine Exchange
- PLY
- POV-Ray scene description language
- PRC
- STEP
- SKP
- STL – A stereolithography format
- U3D– Universal 3D file format
- VRML – Virtual Reality Modeling Language
- XAML
- XGL
- XVL
- xVRML
- X3D
- .3D
- 3DF
- .3DM
- .3ds – Autodesk 3D Studio
- 3DXML
- X3D – Vector format used in 3D applications from Xara
Compound formats
These are formats containing both pixel and vector data, possible other data, e.g. the interactive features of PDF.
- EPS (Encapsulated PostScript)
- MODCA (Mixed Object:Document Content Architecture)
- PDF (Portable Document Format)
- PostScript, a page description language with strong graphics capabilities
- PICT (Classic Macintosh QuickDraw file)
- WMF / EMF (Windows Metafile / Enhanced Metafile)
- SWF (Shockwave Flash)
- XAML User interface language using vector graphics for images.
Stereo formats
- MPO The Multi Picture Object (.mpo) format consists of multiple JPEG images (Camera & Imaging Products Association) (CIPA).
- PNS The PNG Stereo (.pns) format consists of a side-by-side image based on PNG (Portable Network Graphics).
- JPS The JPEG Stereo (.jps) format consists of a side-by-side image format based on JPEG.
See also
- Display resolution
- Display aspect ratio
- List of common display resolutions
- Display resolution standards
References
- ^ Andreas Kleinert (2007). "GIF 24 Bit (truecolor) extensions". Archived from the original on 16 March 2012. Retrieved 23 March 2012.
- ^ Philip Howard. "True-Color GIF Example". Archived from the original on 22 February 2015. Retrieved 23 March 2012.
- ^ Arora, Vikas (3 October 2011). "WebP-Mux (RIFF based container) framework". Google Groups. Archived from the original on 13 March 2013. Retrieved 18 November 2011.
- ^ "WebP Container Specification". Google Developers. Archived from the original on 18 May 2022. Retrieved 4 April 2020. Text was copied from this source, which is available under a Creative Commons Attribution 4.0 International License Archived 2017-10-16 at the Wayback Machine.
- ^ "Gerber File Format Specification". Ucamco. Archived from the original on 2016-03-31. Retrieved 2016-03-21.
- ^ "TinyVG". Archived from the original on 2023-01-09. Retrieved 2023-01-31.