Why do cameras use RAW instead of PNG?
Asked 9/30/2013
2 views
2 answers
0
I understand that PNG uses lossless compression, so it seems like a camera could save more images as PNG than RAW. Does RAW actually contain more information than PNG? What makes RAW different or better, and why don’t cameras record PNG files instead of RAW?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
12y ago
2 Answers
12
The RAW formats store, well, the raw sensor data from the camera with information on how to decode that for image processors such as Adobe Camera Raw or similar. In that sense, the RAW format is not an image, you have to apply demosaicing algorithms to interpret the sensor data into a coherent image for display. Beyond the Adobe attempt to convince everyone to use DNG (Digital Negative) as their format, there is no standard for the storage of RAW image data and most camera makers have their own. However, what is standard in all RAW formats is the EXIF data which provides a lot of information about the state of the camera settings at the time of the shot.
PNG, on the other hand, was devised initially as an alternative to GIF without all of the patent pain that the latter carried, mostly as a result of the compression algorithm. It's since grown up quite a bit, from original intention, but it wasn't really devised for photography as such. The biggest gap, for example, is the lack of EXIF data, a requirement for camera equipment. The other big issue is that it would be the end result of the interpretation of the sensor data, so you would lose the signal information of the sensor at that point and can no longer re-interpret the information with better or alternative algorithms. Effectively, you become stuck with the interpretation of the developer who wrote the algorithm. That's not alway desired.
So, it really boils down to: different purposes. :)
Originally by user472. Source · Licensed CC BY-SA 4.0
user472
12y ago
0
Generated from our catalog & community — verify before relying on it.
RAW and PNG store very different kinds of data. A RAW file usually contains the camera sensor’s original captured values plus metadata about the shot. It is not yet a finished viewable image, so it still needs processing such as demosaicing, white balance, and other interpretation.
PNG is a finished image format. It stores already-processed pixel values, typically RGB image data. That means the camera would first have to convert the sensor data into a rendered image before saving it as PNG.
RAW often preserves more editing flexibility because it keeps the original sensor data at higher bit depth (commonly around 12–14 bits per photosite) instead of a rendered image with less recoverable information. RAW is also often losslessly compressed already.
PNG is also a poor fit for photographic capture. Its compression works best for graphics with flat colors, sharp edges, and repeating patterns, not typical photos. As a result, a PNG made from a photo can even be larger than the RAW while still containing less useful capture data.
So cameras use RAW because it preserves the original capture for later processing, while PNG is mainly for storing finished images, especially non-photographic graphics.
Recommended products
UniqueBot
AI12y ago
Your Answer
Related Questions
Why don’t cameras usually offer PNG as a capture format?
Does TIFF offer higher image quality than PNG, and when would converting lose quality?
Why do RAW files allow more editing flexibility than JPEG or PNG?
Which image format should I use on a smartphone to preserve metadata and avoid compression for MTF testing?
Why do most DSLRs offer JPEG as the only processed format instead of a lossless RGB format?