This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Raw image format" – news ·newspapers ·books ·scholar ·JSTOR(April 2025) (Learn how and when to remove this message) |
| Raw image file | |
|---|---|
| Filename extension | |
| Type of format | Image file formats |
A cameraraw image file is a file that contains unprocessed data straight from a digital camera. Such data can later be changed into a photo, either within a digital camera itself or by usage of external tools. Raw files are so named because they are not yet processed, and contain large amounts of potentially redundant data. Normally, the image is processed by a raw converter, in a wide-gamut internalcolor space where precise adjustments can be made beforeconversion to a viewable photos for storage, printing, or further manipulation. There are dozens of raw formats in use by different manufacturers of digital image capture equipment.
Raw image files are sometimes described as "digitalnegatives". Like transparency film and unlike negative film, raw image pixels contain positiveexposure measurements. The raw datasets are more likeundeveloped film: a raw image can be developed by software in a non-reversible manner[Note 1] to reach a complete image that resolves every pixel in an RGB or other viewable color space. Raw development adjustments include color, contrast, brightness and details recovery. A given raw dataset can be developed many times with different adjustments.
In contrast, developing an exposed film transforms it irreversibly; thus, development cannot be repeated on the same exposed film. If the film is negative, the printing process must invert the image to a positive result.
Like negative photographic film, a raw digital image may have a widerdynamic range or colorgamut than the positive print. Unlike physical film after development, the Raw file preserves the information captured at the time of exposure. The purpose of raw image formats is to save, with minimum loss of information, data obtained from the sensor.
Raw image formats are intended to capture theradiometric characteristics of the scene, that is, physical information about the light intensity and color of the scene, at the best of the camera sensor's performance.[1] Most raw image file formats store information sensed according to the geometry of the sensor's individual photo-receptive elements (sometimes calledpixels) rather than points in the expected final image: sensors with hexagonal element displacement, for example, record information for each of their hexagonally displaced cells, which a decoding software will eventually transform into the rectangular geometry during "digital developing".
Raw files contain the information required to produce a viewable image from the camera's sensor data. The structure of raw files often follows a common pattern:
Many raw file formats, including IIQ (Phase One), 3FR (Hasselblad), DCR, K25, KDC (Kodak), CRW, CR2 (Canon), ERF (Epson), MEF (Mamiya), MOS (Leaf), NEF NRW (Nikon),ORF (Olympus), PEF (Pentax), RW2 (Panasonic) and ARW, SRF, SR2 (Sony), are based onTIFF, the Tag Image File Format.[2] These files may deviate from the TIFF standard in a number of ways, including the use of a non-standard file header, the inclusion of additional image tags and the encryption of some of the tag data.
DNG, the Adobe digital negative format, is an extension of the TIFF 6.0 format and is compatible withTIFF/EP, and uses variousopen formats andstandards, includingExif metadata,XMP metadata,IPTC metadata,CIE XYZ coordinates,ICC profiles, andJPEG.[3]
Indigital photography, the raw file plays the role thatphotographic film plays infilm photography. Raw files thus contain the full dynamic range (typically 12- or 14-bit) data as read out from each of the camera'simage sensorpixels.
The camera's sensor is almost invariably overlaid with acolor filter array (CFA), usually aBayer filter, consisting of a mosaic of a 2x2 matrix of red, green, blue and (second) green filters.
One variation on the Bayer filter is theRGBE filter of theSony Cyber-shot DSC-F828, which exchanged the green in the RG rows with "emerald"[4](ablue-green[5]orcyan[6]color). Other sensors, such as theFoveon X3 sensor, capture information directly in RGB form (using three pixel sensors in each location). This RGB raw data still needs to be processed to make an image file, because the raw RGB values correspond to the responses of the sensors, not to a standard color space likesRGB. As there is no color filter array, there is no need fordemosaicing.
Flatbed andfilm scanner sensors are typically straight narrow RGB or RGBI (where "I" stands for the additional infrared channel for automatic dust removal) strips that are swept across an image. TheHDRi raw data format is able to store the infrared raw data, which can be used forinfrared cleaning, as an additional 16-bit channel. The remainder of the discussion about raw files applies to them as well. Some scanners do not allow the host system access to the raw data at all, as a speed compromise. The raw data are processed very rapidly inside the scanner to select out the best part of the available dynamic range so only the result is passed to the computer for permanent storage, reducing the amount of data transferred and therefore the bandwidth requirement for any given speed of image throughput.[citation needed]
Panasonic's raw converter corrects geometric distortion andchromatic aberration on such cameras as theLX3,[7][8][9] with necessary correction information presumably included in the raw.[10]Phase One's raw converterCapture One also offers corrections for geometrical distortion,chromatic aberration, purple fringing and keystone correction emulating the shift capability oftilt-shift in software and specially designed hardware, on most raw files from over 100 different cameras.[11][12] The same holds for Canon's DPP application, at least for all more expensive cameras like allEOS DSLRs and theG series of compact cameras.To obtain an image from a raw file, this mosaic of data must be converted into standard RGB form. This is often referred to as "raw development".
When converting from the four-sensor 2x2 Bayer-matrix raw form into RGB pixels, each pixel only contains partial colour data and so the remaining colour data is interpolated from the surrounding pixels. There are several algorithms used to achieve this. Simple algorithms such aslinear interpolation result in colour artifacts and blurring.
If raw format data is available, it can be used inhigh-dynamic-range imaging conversion, as a simpler alternative to the multi-exposure HDI approach of capturing three separate images, one underexposed, one correct and one overexposed, and "overlaying" one on top of the other.
Providing a detailed and concise description of the content of raw files is highly problematic. There is no single raw format; formats can be similar or radically different. Different manufacturers use their own proprietary and typically undocumented formats, which are collectively known as raw format. Often they also change the format from one camera model to the next. Several major camera manufacturers, including Nikon, Canon and Sony,encrypt portions of the file in an attempt to prevent third-party tools from accessing them.[13]
This industry-wide situation of inconsistent formatting has concerned many photographers who worry that their valuable raw photos may someday become inaccessible, as computer operating systems and software programs become obsolete and abandoned raw formats are dropped from new software. The availability of high-qualityopen source software which decodes raw image formats, particularlydcraw, has helped to alleviate these concerns. An essay byMichael Reichmann and Juergen Specht stated "here are two solutions – the adoption by the camera industry of A: Public documentation of RAW formats; past, present and future, or, more likely B: Adoption of a universal RAW format".[14][15][16] "Planning for [US] Library of Congress Collections" identifies generic raw-file formats as "less desirable file formats", and identifies DNG as a suggested alternative.[17]
| Name | Date | Specification available? | Description |
|---|---|---|---|
| TIFF/EP | 2001 | Yes, ISO 12234-2 | Defines a basic framework for storing raw and processed images in TIFF. Is the basis of many other RAW formats: for example, Nikon NEF is essentially TIFF/EP, complete with a tag which identifies the version of TIFF/EP they are based on.[18] |
| Digital Negative (DNG) | 2004 | Yes, from Adobe | Extension of TIFF/EP, adding information on camera characteristics.[19] Is royalty-free.[20] Progress on DNG has fed back into TIFF/EP: a TIFF/EP progress report from September 2009 states that "This format will be similar to DNG 1.3, which serves as the starting point for development."[21] |
| Canon Raw v2 (CR2) | 2005 | Reverse-engineered | Based on TIFF[22] and lossless Jpeg ITU-T81.[23] |
| Canon Raw v3 (CR3) | 2018 | Reverse-engineered | Uses theISO base media file format container with custom tags and a custom "crx" codec.[24] |
| Sony RAW (SRF, SR2, ARW and ARQ) | 2004 | Reverse-engineered | Based on TIFF container, uses proprietary Makernote fields. May be uncompressed, proprietary lossy-compressed, or Jpeg lossless compressed depending on version.[25] |
DNG is the only raw image format for which industry-wide buy-in is being sought. It is based upon, and compatible with, the ISO standard raw image format ISO 12234-2,TIFF/EP, and is being used by ISO in their revision of that standard.[26] Makers of "niche" cameras who might otherwise have difficulty getting support from software companies frequently use DNG as their native raw image format. Pentax uses DNG as an optional alternative to their own raw image format. There are 15 or more such companies, even a few that specialize in movie cameras, includingLeica,Samsung,Ricoh,Pentax,Hasselblad.[26][27] In addition, most Canon point & shoot cameras can support DNG by usingCHDK, andBetter Light can export to DNG.[27] Open-source developers also use DNG.[13]
To be viewed or printed, the output from a camera'simage sensor has to be processed, that is, converted to a photographic rendering of the scene, and then stored in a viewableraster graphics format such as uncompressed RGBTIFF or lossy compressed such as byJPEG. This processing, whether done in-camera or later in a raw-file converter, involves a number of operations, typically including:[28][29]
Demosaicing is only performed forCFA sensors; it is not required for3CCD orFoveon X3 sensors.
Cameras and image processing software may also perform additional processing to improve image quality, for example:

When a camera saves a raw file it defers most of this processing; typically the only processing performed is the removal of defective pixels (the DNG specification requires that defective pixels be removed before creating the file[34]). Some camera manufacturers do additional processing before saving raw files; for example, Nikon has been criticized byastrophotographers for applying noise reduction before saving the raw file.[35]
Some raw formats also allownonlinear quantization.[36][37] This nonlinearity allows the destructive compression of the raw data with less visible degradation of the image by removing invisible and irrelevant information from the image. Although noise is discarded this has nothing to do with (visible) noise reduction.[citation needed]
Nearly all digital cameras can process the image from thesensor into a TIFF image using settings forwhite balance,color saturation,contrast, andsharpness that are either selected automatically or entered by the photographer before taking the picture. Cameras that produce raw files save these settings in the file, but defer the processing. This results in an extra step for the photographer, so raw is normally only used when additional computer processing is intended. However, raw has numerous advantages over TIFF such as:
.r3d Redcode Raw with compression ratio from 3:1 to 18:1 which depends on resolution and frame rates.[41]Cameras that support raw files typically come withproprietary software for conversion of their raw image data into standard RGB images. Other processing and conversionprograms andplugins are available from vendors that have either licensed the technology from the camera manufacturer orreverse-engineered the particular raw format and provided their own processing algorithms.
In January 2005,Apple releasediPhoto 5, which offered basic support for viewing and editing many raw file formats.
In April 2005, Apple'sOS X 10.4 brought raw support to the operating system's ImageIO framework, enabling raw support automatically in the majority of macOS applications both from Apple (such as Preview, macOS's PDF and image viewing application, andAperture, a photo post-production software package for professionals) as well as all third party applications which make use of the ImageIO frameworks.
Semi-regular updates to macOS generally include updated support for new raw formats introduced in the intervening months by camera manufacturers.
In 2016, Apple announced thatiOS 10 would allow capturing raw images on selected hardware, and third party applications will be able to edit raw images through the operating system'sCore Image framework.[43]
In 2020, Apple released theiPhone 12 Pro andiPhone 12 Pro Max. Both of these devices support Apple ProRAW (as of iOS 16.0.3) output and viewing. The later Pro and Pro Max models also provide ProRAW output.[44] Two raw options are in fact available for capture: a traditional "Bayer RAW" and Apple's "ProRAW" both in 12-bit DNG.[45] The ProRAW option is demosaiced and partially processed. It can be used with HDR, Deep Fusion, or Night mode, which is not possible with Bayer RAW. The data inside remain scene-referred like "true" RAW images.[46]
Microsoft supplies the free Windows Camera Codec Pack forWindows XP and later versions of Microsoft Windows, to integrate raw file viewing and printing into some Microsoft Windows tools.[47] The codecs allow native viewing of raw files from a variety of specific cameras inWindows Explorer / File Explorer andWindows Live Photo Gallery / Windows Photo Gallery, inWindows Vista andWindows 7.[48] As of October 2016, Microsoft had not released an updated version since April 2014, which supported some specific cameras by the following manufacturers: Canon, Casio, Epson, Fujifilm, Kodak, Konica Minolta, Leica, Nikon, Olympus, Panasonic, Pentax, Samsung, and Sony. In 2019, the Microsoft Raw Image Extension essentially replaced this for Windows 10 and later versions.[48]
Microsoft as of 2019 supplies the free Raw Image Extension forWindows 10 and later versions of Microsoft Windows, to integrate raw file viewing and printing into some Microsoft Windows tools.[49] The Extension allows native viewing of raw files from many mid- to high-end digital cameras inWindows Explorer / File Explorer andMicrosoft Photos.
Microsoft Windows supports the Windows Imaging Component (WIC) codec standard. WIC was available as a stand-alone downloadable program for Windows XP Service Pack 2, and built intoWindows XP Service Pack 3,Windows Vista, and later versions. Windows Explorer / File Explorer, and Windows Live Photo Gallery / Windows Photo Gallery can view raw formats for which the necessary WIC codecs are installed. Canon, Nikon, Sony, Olympus and Pentax have released WIC codecs for their cameras, although some manufactures only provide codec support for the 32-bit versions of Microsoft Windows.[50]
CommercialDNG WIC codecs are also available from Ardfry Imaging,[51] and others; andFastPictureViewer Professional installs a set of WIC-enabled image decoders.[52][53]
Android Lollipop 5.0, introduced in late 2014, can allowsmartphones to take 10-bit and 16-bit raw images, useful in low-light situations.[54] 12-bit RAW was introduced in API Level 23 (Android 6.0).[55]
In addition to those listed under operating system support, above, the commercial software described below support raw formats.
The following products were launched as raw processing software to process a wide range of raw files, and have this as their main purpose:
Less commonly, raw may also refer to a generic image file format containing only pixel color values. For example, "Photoshop Raw" files (.raw) contain a pure array of bytes top-to-bottom, left-to-right pixel order. Dimensions must be input manually when such files are re-opened, or a square image is assumed. Also the channel size and bit-depth per channel has to be provided when opening this format, as the ambiguities of whether the bytes are to be decoded as single channels at high precision, or multiple channels at lower precision, is not determinable from the byte array itself. Due to its simplicity, this format is very open and compatible, though limited by its lack of metadata andrun-length encoding. Especially in photography and graphic design, where color management and extended gamuts are important, and large images are common.
{{cite journal}}:Cite journal requires|journal= (help)Compared to photos taken in Bayer RAW format, the system demosaics and partially processes Apple ProRAW photos. They're still scene-referred (i.e. without colorspace compressionm still useful for high-dynamic-range imaging), however, and allow capturing RAW photos in modes that don't have a traditional Bayer RAW format available, such as modes that rely on fusing multiple captures.