Friday 21 June 2019

file format - Difference between PNG and RAW, other than compression?


I know that many professional cameras shoot in RAW. PNG has lossless compression which would allow cameras to save more shots than RAW. This leads me to wonder if there's anything special about RAW that makes it save more data than PNG.


I am not familiar with the RAW format and I don't come from a photography background. I have asked several people with professional cameras that shot in RAW and they weren't too sure, but they seemed to to think that RAW saved more actual data than PNG. Is this true? What, if anything, makes RAW better than PNG, and if there's no difference, why don't cameras shoot in PNG instead of RAW?



Answer



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. :)


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...