Hubbry Logo
Image file formatImage file formatMain
Open search
Image file format
Community hub
Image file format
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Image file format
Image file format
from Wikipedia

An image file format is a file format for a digital image. There are many formats that can be used, such as JPEG, PNG, and GIF. Most formats up until 2022 were for storing 2D images, not 3D ones. The data stored in an image file format may be compressed or uncompressed. If the data is compressed, it may be done so using lossy compression or lossless compression. For graphic design applications, vector formats are often used. Some image file formats support transparency.

Raster formats are for 2D images. A 3D image can be represented within a 2D format, as in a stereogram or autostereogram, but this 3D image will not be a true light field, and thereby may cause the vergence-accommodation conflict.

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

[edit]

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 sizes. 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

[edit]

There are two types of image file compression algorithms: lossless and lossy.

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

[edit]
Digital photographyImage editingDigital artRaster graphicsVector graphicsPublishingImage file formatRaw image formatEXR fileGIMPAdobe PhotoshopKritaAdobe IllustratorInkscapeAdobe InDesignHigh Efficiency Image File FormatJPEGTIFFGIFWebPAVIFJPEG XLPNGScalable Vector GraphicPDFPostScript
Categorization of common image file formats by scope (imagemap)

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, Metafile formats are portable formats that can include both raster and vector information. Examples are application-independent formats such as WMF and EMF. The metafile format is an intermediate format. Most applications open metafiles and then save them in their own native format. Page description language refers to formats used to describe the layout of a printed page containing text, objects, and images. Examples are PostScript, PDF, and PCL.

Raster formats (2D)

[edit]

Delivery formats

[edit]
JPEG
[edit]

JPEG (Joint Photographic Experts Group) is a lossy compression method; JPEG-compressed images are usually stored in the JFIF (JPEG File Interchange Format) or the Exif (Exchangeable Image File Format) file format. The JPEG filename extension is JPG or JPEG. Nearly every digital camera can save images in the JPEG format, which supports eight-bit grayscale images and 24-bit color images (eight bits each for red, green, and blue). JPEG applies lossy compression to images, which can result in a significant reduction of the file size. Applications can determine the degree of compression to apply, and the amount of compression affects the visual quality of the result. When not too great, the compression does not noticeably affect or detract from the image's quality, but JPEG files suffer generational degradation when repeatedly edited and saved. (JPEG also provides lossless image storage, but the lossless version is not widely supported.)

GIF
[edit]

The GIF (Graphics Interchange Format) is in normal use limited to an 8-bit palette, or 256 colors (while 24-bit color depth is technically possible).[1][2] GIF is most suitable for storing graphics with few colors, such as simple diagrams, shapes, logos, and cartoon-style images, as it uses LZW lossless compression, which is more effective when large areas have a single color and less effective for photographic or dithered images. Due to GIF's simplicity and age, it achieved almost universal software support. Due to its animation capabilities, it is still widely used to provide image animation effects, despite its low compression ratio compared to modern video formats.

PNG
[edit]

The PNG (Portable Network Graphics) file format was created as a free, open-source alternative to GIF. The PNG file format supports 8-bit (256 colors) paletted images (with optional transparency for all palette colors) and 24-bit truecolor (16 million colors) or 48-bit truecolor with and without an alpha channel – while GIF supports only 8-bit palettes with a single transparent color.

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
[edit]

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
[edit]

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
[edit]

Most typical raster formats cannot store HDR data (32 bit floating point values per pixel component), which is why some relatively old or complex formats are still predominant here, and worth mentioning separately. Newer alternatives are showing up, though. RGBE is the format for HDR images originating from Radiance and also supported by Adobe Photoshop. JPEG-HDR is a file format from Dolby Labs similar to RGBE encoding, standardized as JPEG XT Part 2.

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
[edit]

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
[edit]

AVIF is an image container, that is used to store AV1 encoded images. It was created by Alliance for open media (AOMedia) and is completely open source and royalty-free. It supports encoding images in 8, 10 and 12-bit depth.

JPEG XL
[edit]

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 and interchange formats

[edit]
TIFF
[edit]

The TIFF (Tag Image File Format) format is a flexible format usually using either the TIFF or TIF filename extension. The tag structure was designed to be easily extendible, and many vendors have introduced proprietary special-purpose tags – with the result that no one reader handles every flavor of TIFF file. TIFFs can be lossy or lossless, depending on the technique chosen for storing the pixel data. Some offer relatively good lossless compression for bi-level (black&white) images. Some digital cameras can save images in TIFF format, using the LZW compression algorithm for lossless storage. TIFF image format is not widely supported by web browsers, but it remains widely accepted as a photograph file standard in the printing business. TIFF can handle device-specific color spaces, such as the CMYK defined by a particular set of printing press inks. OCR (Optical Character Recognition) software packages commonly generate some form of TIFF image (often monochromatic) for scanned text pages.

BMP
[edit]

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
[edit]

Netpbm format is a family including the portable pixmap file format (PPM), the portable graymap file format (PGM), and the portable bitmap file format (PBM). These are either pure ASCII files or raw binary files with an ASCII header that provide very basic functionality and serve as a lowest common denominator for converting pixmap, graymap, or bitmap files between different platforms. Several applications refer to them collectively as PNM (Portable Any Map).

Container formats of raster graphics editors
[edit]

These image formats contain various images, layers and objects, out of which the final image is to be composed by raster graphics editors:

Other raster formats

[edit]
  • 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.
  • ICO—container for one or more icons (subsets of BMP and/or PNG)
  • ILBMIFF-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
  • Nrrd (Nearly raw raster data)
  • PAM (Portable Arbitrary Map)—late addition to the Netpbm family
  • PCX (PiCture eXchange)—obsolete
  • PGF (Progressive Graphics File)
  • 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
  • VICAR file formatNASA/JPL image transport format
  • XISF (Extensible Image Serialization Format)[6]

Vector formats

[edit]

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 CRT technology such as that used in some electronic test equipment, medical monitors, radar displays, laser shows and early video games. Plotters are printers that use vector data rather than pixel data to draw graphics.

CGM

[edit]

CGM (Computer Graphics Metafile) is a file format for 2D vector graphics, raster graphics, and text, and is defined by ISO/IEC 8632. All graphical elements can be specified in a textual source file that can be compiled into a binary file or one of two text representations. CGM provides a means of graphics data interchange for computer representation of 2D graphical information independent from any particular application, system, platform, or device. It has been adopted to some extent in the areas of technical illustration and professional design, but has largely been superseded by formats such as SVG and DXF.

Gerber format (RS-274X)

[edit]

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.[7]

SVG

[edit]

SVG (Scalable Vector Graphics) is an open standard created and developed by the World Wide Web Consortium to address the need (and attempts of several corporations) for a versatile, scriptable and all-purpose vector format for the web and otherwise. The SVG format does not have a compression scheme of its own, but due to the textual nature of XML, an SVG graphic can be compressed using a program such as gzip. Because of its scripting potential, SVG is a key component in web applications: interactive web pages that look and act like applications.

Other 2D vector formats

[edit]

3D vector formats

[edit]

Compound formats

[edit]

These are formats containing both pixel and vector data, possible other data, e.g. the interactive features of PDF.

Stereo formats

[edit]

See also

[edit]

References

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
An image file format is a standardized specification for encoding data into a file, defining the structure for storing pixel values, metadata, color profiles, and other attributes to ensure compatibility and efficient representation across systems. These formats are crucial for , as they determine how images are compressed, displayed, and processed, with choices influenced by factors like , preservation, transparency support, and intended use such as web , , or . Broadly categorized into raster and vector types, image file formats have evolved since the to balance storage efficiency and visual fidelity, starting with uncompressed formats like BMP and advancing to compressed standards developed by organizations such as the (ISO). Raster formats, also known as bitmap formats, represent images as a rectangular grid of , where each pixel holds color and intensity , making them resolution-dependent and best suited for photorealistic images but susceptible to when enlarged. Prominent examples include JPEG (), introduced in 1992 by the for that reduces file sizes by discarding less perceptible details, ideal for web photographs; PNG (), released in 1996 as a patent-free alternative to GIF, providing , alpha transparency, and support for up to 16 million colors; and GIF (), developed in 1987 by for simple animations and indexed colors limited to 256 shades per frame. Other raster formats like TIFF (Tagged Image File Format), originated in 1986 by , offer versatile, lossless storage with extensive metadata tags for professional archiving and printing. In contrast, vector formats store images using mathematical equations to define scalable paths, curves, and shapes rather than pixels, enabling infinite resizing without quality loss and smaller file sizes for geometric designs like logos or diagrams. Key examples are (Scalable Vector Graphics), a W3C Recommendation from 2001 based on XML for interactive web graphics with built-in animation capabilities, and EPS (Encapsulated PostScript), a late 1980s Adobe format embedding code for high-resolution printing in workflows. Hybrid or specialized formats, such as PDF (Portable Document Format) for embedding images in documents or for modern web optimization with both lossy and lossless modes, further extend versatility in contemporary applications.

Introduction and History

Definition and Purpose

An image file format is a standardized method for encoding and organizing data, typically consisting of a header that identifies the format and includes essential metadata such as image dimensions and color information, followed by the core image data—either a array for raster images or mathematical path descriptions for vector images—and often concluding with a footer containing end markers or checksums to verify . The primary purpose of these formats is to facilitate the efficient storage, display, , and transmission of visual information across diverse hardware platforms and software applications, ensuring compatibility and preserving image quality where possible. For example, they support use cases such as rendering images on websites for quick loading, producing high-fidelity prints in professional workflows, and maintaining archival copies for long-term preservation without degradation. Image file formats can be broadly categorized into proprietary ones, such as Adobe's PSD (Photoshop Document), which are designed for specific software ecosystems and retain advanced editing features like layers, and open standards like (Portable Network Graphics), governed by international specifications to promote widespread . This distinction influences their adoption: proprietary formats excel in specialized creative tools but limit cross-platform use, while open formats enable seamless interchange in open-source and web environments.

Historical Development

The evolution of image file formats traces back to the , when graphics emerged as a foundational technology for . Early systems like the , introduced in 1973 by PARC, utilized bitmapped displays to render graphical interfaces, storing images as simple arrays of pixels in memory, which laid the groundwork for raster-based formats. In the late and early , personal computing spurred proprietary formats, such as Apple's format (PNTG), released in 1984 alongside the original Macintosh, which supported monochrome raster images of 576 × 720 pixels for basic drawing and editing. The 1980s marked significant milestones in standardization for broader interchange. developed the in 1986 to facilitate high-quality exchange in workflows, supporting both lossless and multi-page storage. Shortly after, introduced the Graphics Interchange Format (GIF) in 1987 as a compact, color-supporting raster format optimized for online transmission, employing LZW compression to reduce file sizes for early use. The 1990s saw explosive growth driven by and web expansion. The (JPEG), standardized in 1992 by ITU-T and ISO/IEC JTC 1/SC 29, introduced using (DCT) techniques, enabling efficient storage of photographic images and becoming ubiquitous for consumer media. In response to GIF's patent issues, the (W3C) endorsed the Portable Network Graphics (PNG) format in 1996 as a patent-free alternative, utilizing compression for lossless raster images suitable for web graphics. Entering the 2000s and 2010s, vector formats gained prominence alongside raster advancements for scalable web content. The W3C released (SVG) in 1999 as an XML-based standard for 2D vector images, enabling resolution-independent rendering and interactivity in browsers. Google launched in 2010, a raster format based on the video codec, to enhance web performance with superior compression for both lossy and lossless images. The (MPEG) finalized the (HEIF) in 2015, leveraging HEVC compression for multi-image containers, which gained traction in mobile devices for efficient photo storage. In the 2020s, formats emphasized royalty-free efficiency amid rising bandwidth demands. The (AOMedia) released in 2019, building on the for high-fidelity raster compression, achieving broad browser support by 2025 for web and app deployment. The JPEG Committee standardized in 2022, integrating lossy and lossless modes with animation capabilities to succeed legacy , though its adoption by 2025 remains niche, primarily in professional software and select platforms like . Standardization efforts have been pivotal, with organizations like ISO/IEC JTC 1/SC 29 overseeing JPEG developments, W3C championing open web formats such as and , and the (IETF) formalizing others via RFCs, including in 2024. Overall, the field has shifted from proprietary, hardware-specific formats to open, royalty-free standards, prioritizing web efficiency, mobile optimization, and seamless cross-platform compatibility.

Core Concepts

File Sizes and Storage Requirements

The size of an image file is fundamentally determined by the amount of required to represent its , plus any additional overhead from file elements such as headers and metadata. For uncompressed raster images, the core size is calculated based on the image's dimensions and color representation. This provides a baseline for understanding storage needs before considering any reduction techniques. The formula for the uncompressed raster image size in bytes is: Size=width (pixels)×height (pixels)×bits per pixel8\text{Size} = \frac{\text{width (pixels)} \times \text{height (pixels)} \times \text{bits per pixel}}{8} Here, bits per pixel accounts for the color depth and number of channels; for example, a standard RGB image uses 24 bits per pixel (8 bits each for , , and channels). Applying this to a full HD image of 1920 × 1080 pixels with 24-bit RGB yields (1920 × 1080 × 24) / 8 = 6,220,800 bytes, or approximately 6.2 MB for the pixel data alone, excluding overhead. Headers and metadata typically add a small fixed amount, often tens to hundreds of bytes, depending on the format. Several factors influence the overall . Resolution, defined by width and height in s, directly scales the total pixel count and thus the data volume. varies from 1 bit for images, which support only black and white, to 16 bits or more per channel for (HDR) images that capture a wider tonal range. The number of channels also matters: RGB requires three channels, while RGBA adds a fourth for transparency (alpha), increasing bits per pixel to 32 for 8-bit-per-channel depth. Compression ratios further affect final sizes by reducing redundancy, though the uncompressed baseline remains key for planning. These sizes have significant implications for storage and transmission. Larger files increase storage costs on devices and servers, where high-resolution images can quickly consume gigabytes; for instance, a single 4K uncompressed RGB exceeds 24 MB. In terms of bandwidth, transmitting such files over networks demands more data transfer, potentially slowing load times—ideal web images are often kept under 100 KB to ensure fast rendering on varied connections and devices. This creates trade-offs between quality (higher resolution and depth) and practicality, such as fitting within mobile storage limits or optimizing for low-bandwidth environments. File sizes are measured in bytes (), with kilobytes (KB) equaling 1,024 bytes and megabytes (MB) equaling 1,048,576 bytes, reflecting binary storage conventions. Tools like online image file size calculators allow users to estimate uncompressed sizes by inputting dimensions, bit depth, and channels, aiding in preemptive planning for projects.

Compression Techniques

Image compression techniques aim to reduce the size of image while preserving essential visual , enabling efficient storage and transmission. These methods exploit redundancies in image , such as spatial correlations between pixels or statistical patterns in pixel values. Broadly, compression is categorized into lossless and lossy types, with the choice depending on whether exact reconstruction of the original image is required. Lossless compression ensures perfect reversibility, reconstructing the original image without any data loss, making it suitable for applications like or archiving where fidelity is critical. It achieves reductions typically between 20% and 50% by encoding redundancies without discarding information. Key algorithms include (RLE), which replaces sequences of identical pixels with a single value and a count of repetitions, effective for images with large uniform areas like icons or scanned text. , introduced in , assigns variable-length codes to symbols based on their frequency of occurrence, using shorter codes for more frequent symbols to minimize average code length. The algorithm, combining LZ77 dictionary-based compression with , is widely used in formats like for its balance of speed and efficiency. Lossy compression, in contrast, discards less perceptually important data to achieve higher ratios, often 10:1 or more, at the cost of irreversible alterations, ideal for web images or photography where minor quality loss is tolerable. Transform-based methods like the Discrete Cosine Transform (DCT) in JPEG convert spatial data into frequency components, concentrating energy in low frequencies for selective quantization. The forward 2D DCT for an 8×8 block is given by: Fuv=14CuCvx=07y=07fxycos[(2x+1)uπ16]cos[(2y+1)vπ16]F_{u v} = \frac{1}{4} C_u C_v \sum_{x=0}^{7} \sum_{y=0}^{7} f_{x y} \cos \left[ \frac{(2x + 1) u \pi}{16} \right] \cos \left[ \frac{(2y + 1) v \pi}{16} \right] where C0=12C_0 = \frac{1}{\sqrt{2}}
Add your contribution
Related Hubs
User Avatar
No comments yet.