Home · Register · Search · View Winners · Software · Hosting · Software · Join Upload & Sell

My posts · My subscriptions
  

  Previous versions of Eyeball's message #11387741 « .XMP file extension? »

  

Eyeball
Online
Upload & Sell: On
Re: .XMP file extension?


RustyBug wrote:
As I understand it (hopefully correctly) ... the XMP file is NOT an image file, it is only a copy of the set of instructions (for raw converter to use) of what changes to make that you want made to the corresponding raw image file (i.e. based on your LR/PS editing of the raw file).


That is correct. The XMP is actually a text file that documents the "edits" that were produced by the raw processor so that they can be reproduced the next time you open that RAW file in the raw development software. It is a text file and you can look at the contents if you like in just about any type of text editor, including MS Word.

The use of XMP files is not limited to just photography. It is a general standard in the IT industry for transmitting meta data (data about data). It is used in many different computer applications. The content of the XMP depends on the application that uses it. Here is more info:

http://en.wikipedia.org/wiki/Extensible_Metadata_Platform

When using a raw developer (Lightroom, for example), the software will often give you the alternatives of storing the parametric edits in a central database or as the individual XMPs or both.

RustyBug wrote:
Why does a tiff file GROW to such a large size compared to the raw?


To understand this, it's helpful to run the numbers. Let's start with the TIF file since that's the easiest to explain.

For a 16-bit, uncompressed TIF with only one image layer, you can calculate the file size in bytes this way:

Vertical dimension in pixels * Horizontal dimension in pixels * 3 color channels * 2 bytes

For my Canon 5D2, this would be 3744*5616*3*2 = 126,157,824 bytes.
In computer science "kilo", "mega", and so on use a factor of 1024 (2 to the 10th power) rather than 1000 so 126,157,824 bytes would be 123,201 kB or 120.31MB.

The actual size will probably be slightly higher for additional overhead like an embedded ICC color profile. It will be much bigger if there are additional layers. It will get smaller if one of the TIF lossless compressions options are used when the file is written.

Now for a RAW file. Most camera manufacturers use some form of lossless compression (and I believe Nikon even has a lossy alternative) for their RAW files. To start, however, we can do a rough calculation for an uncompressed raw file:

Vertical dimension in pixels * Horizontal dimension in pixels * 2 bytes * # bits recorded / 16 bits

For my Canon 5D2, this would be 3744*5616*2*14*16 = 36796032 bytes = 35933.6 kB = 35.1 MB.

Note that there is no multiplication by 3 color channels. That is because with a bayer sensor, there is only one photosensor for each pixel, whether it be a red, green, or blue sensitive photosensor. Later during raw development, the values from these photosensors are interpolated to produce RGB values for each photosensor site.

Taking a look at a few of my 5D2 raw files, they range in size from about 22,500 kB to about 29,500 kB, which sounds about right taking into account the lossless compression that Canon is applying when the file is written. Roughly speaking, lossless compression looks for repeating patterns in the data and uses "shorthand" to represent those repeating patterns in the stored file. The more random the data is, the less the file can be compressed. If there is something in the file that causes strings of repeated values (like many photosensor values clipped to full black or full white) that will allow for more compression in the stored file.

Hope that helps. If anyone catches any errors in what I wrote, please let me know.

RustyBug wrote:
And what is the primary distinction/advantage for a tiff file vs. a raw that would warrant working with such a large file?


There is currently no software that I know of that allows true, pixel-level editing of a raw file. In other words, it is not possible for you to edit and save the edited file in the raw format. Raw development software instead saves the edits as parametric metadata apart from the raw file, either in a central database or in an additional file (like the XMP previously mentioned).

When you need to use editing software that uses rendered RGB files (like Photoshop), RAW is no longer an option and a lossless file format like TIF is usually desired if the user wants to preserve the maximum amount of image information (and even TIF may not preserve all of the information contained in the original RAW).

You normally use editing software that works on rendered files because it provides features that current raw developers don't provide. That may include things like layers and sophisticated cloning/healing.

The gap between capabilities of raw developers (like Lightroom) and rendered editors (like Photoshop) has been slowly closing but I think it will be a while yet before we see all of the functionality of something like PS put into LR. One of the limiting factors is the quantity of parametric edits that begins to be generated by the raw developer and the performance of storing, reading, and changing that information during the editing process. Storing an exposure or white balance setting is pretty simple and doesn't take up much space, but when you start pixel-level edits like cloning, the quantity of generated instructions increases significantly. The mouse location and movement needs to be constantly recorded along with the brush size, feathering, opacity, and so on. Do much work with cloning, healing, and gradients in LR and you will see your XMP file increase significantly and those functions in LR are currently very limited compared to their counterparts in PS.




Mar 03, 2013 at 01:51 PM



  Previous versions of Eyeball's message #11387741 « .XMP file extension? »