# Adding Metadata To A New File



## Sandyjas (Aug 7, 2015)

When you Save To File (XMP) in Lightroom... or in any other program, add new metadata on a virgin photo file (that has had nothing new ever added to it), does this change the orientation slightly of all the photo image pixel information from it's original place in the file structure when you add new metadata to the file? Or does the whole file itself somehow shift it's structure?  Or does, usually, the image pixel information stay in place on the file and the metadata part of the file expand. I read something on this a while back.  I am using D100 NEF and D800E NEFs. ( I've read that file structure can be different for different camera types.) If the image pixel information shifts a bit, when you do this, is this  less than great to do, if you are concerned about a photo file's fine crisp display, readability, or archival state, way into the future...50 years or more? Is this one of the reasons that digital asset management sometimes teaches or advises people to archive their original photos untouched, and use copies for Lightroom/Other Programs(with metadata)? This is something I can't find information on. Does it happen?  Did it happen?  What does it mean?  Thank You for any information on this.  

Thank You,

Sandy


----------



## Jim Wilde (Aug 7, 2015)

Unless you convert to DNG, there is no issue as when saving XMP data it is not written back to the original raw file, instead it's written into an XMP "sidecar" file. The raw file remains completely untouched.

If you convert your raw files to DNG, however, the XMP data is written into the XMP section of the file header. If the new information can fit inside the space allocated to that XMP data block, well and good and I believe the file header is updated accordingly. If, however, the new information cannot fit, in that situation a new copy of the file is created which will have the new XMP data in an expanded header section, then the original image file is written back to the new file. But the image data is never changed, only it's relative position within the full file may be different, but that's of no consequence in terms of the integrity of that data.


----------



## Roelof Moorlag (Aug 7, 2015)

My advice is to buy the DAM book for photographers. Peter Krogh makes this all clear! (http://thedambook.com/)
An impression of his quality you can acquire for free at dpbestflow: http://www.dpbestflow.org/


----------



## Sandyjas (Aug 10, 2015)

Jim Wilde said:


> Unless you convert to DNG, there is no issue as when saving XMP data it is not written back to the original raw file, instead it's written into an XMP "sidecar" file. The raw file remains completely untouched.
> 
> If you convert your raw files to DNG, however, the XMP data is written into the XMP section of the file header. If the new information can fit inside the space allocated to that XMP data block, well and good and I believe the file header is updated accordingly. If, however, the new information cannot fit, in that situation a new copy of the file is created which will have the new XMP data in an expanded header section, then the original image file is written back to the new file. But the image data is never changed, only it's relative position within the full file may be different, but that's of no consequence in terms of the integrity of that data.



Thank You for the Raw file and Raw to Dng information.  I already have many older files that are D100 Tiff.  They are already keyworded.  I want to add new keywords to them.  I could just add these new keywords in the LR Catalog and let it go at that.   But what will happen to the Tiff file structure and integrity if I add more metadata to the file outside of Lightroom?  Is this also safe for the longer term integrity of the file.  I really have no idea.

Thank You for any in depth information,

Thank You,

Sandy


----------



## Sandyjas (Aug 10, 2015)

Roelof Moorlag said:


> My advice is to buy the DAM book for photographers. Peter Krogh makes this all clear! (http://thedambook.com/)
> An impression of his quality you can acquire for free at dpbestflow: http://www.dpbestflow.org/



I have read parts of his book and taken some notes.   As yet I did not run into anything on this.  Unfortunately, at this time, I don't have time, with my job and Lightroom, and the house, to delve into everything.  I would try and acquire the book in the future. But thank you for links!

Thank You,

Sandy


----------



## clee01l (Aug 10, 2015)

Sandyjas said:


> Thank You for the Raw file and Raw to Dng information.  I already have many older files that are D100 Tiff.  They are already keyworded.  I want to add new keywords to them.  I could just add these new keywords in the LR Catalog and let it go at that.   But what will happen to the Tiff file structure and integrity if I add more metadata to the file outside of Lightroom?  Is this also safe for the longer term integrity of the file.  I really have no idea.
> 
> Thank You for any in depth information,
> 
> ...


DNG, JPG, TIF are published public file formats.  In each there is a header section that is extendable according to the format rules. No XMP sidecar file will be created for these formats because there is an XMP section in the formate header. Each has a keyword field and any keywords added in LR will be appended to the keywords already in the keyword field. However in LR this only occurs IF the checkbox labeled "Automatically write changes into XMP" is checked OR you use the shortcut key {Cmd/Cntl}{S} to manually write the metadata to the original image file.


----------



## Sandyjas (Aug 10, 2015)

clee01l said:


> DNG, JPG, TIF are published public file formats.  In each there is a header section that is extendable according to the format rules. No XMP sidecar file will be created for these formats because there is an XMP section in the formate header. Each has a keyword field and any keywords added in LR will be appended to the keywords already in the keyword field. However in LR this only occurs IF the checkbox labeled "Automatically write changes into XMP" is checked OR you use the shortcut key {Cmd/Cntl}{S} to manually write the metadata to the original image file.



(?) So usually, would the format rules extend to add on a _normal_ amount of metadata?  Would you have any idea, or approx. idea of how much you could add?  For Nikon Tiff?   What would happen if you extended over format rules?  (In the end, I'm mostly adding only keywords to these Tiffs.  And when I finish, the largest amount of keywords (and keyword phrases) I would end up with on some files would be around 35.  

Sandy


----------



## Roelof Moorlag (Aug 10, 2015)

35 keywords is no problem at all (is my experience). I don't know of any formal limits.

If you want to 'touch' the file directly than Bridge is more handy in my opinion. You can write Keywords into the metadata of the file directly and/or read those from other applications wihtout extra actions.


----------



## clee01l (Aug 10, 2015)

Sandyjas said:


> (?) So usually, would the format rules extend to add on a _normal_ amount of metadata?  Would you have any idea, or approx. idea of how much you could add?  For Nikon Tiff?   What would happen if you extended over format rules?  (In the end, I'm mostly adding only keywords to these Tiffs.  And when I finish, the largest amount of keywords (and keyword phrases) I would end up with on some files would be around 35.
> 
> Sandy





> From http://www.photometadata.org/meta-resources-field-guide-to-metadata#Keywords
> *
> Keywords* [IPTC Core]
> Enter keyword terms or phrases to describe the subject of content in the photograph. Keywords may be free text (i.e., they need not from a controlled vocabulary). You may enter (or paste) _any number_ of keywords, terms or phrases into this field. Each keyword term should be separated by a delimiter, such as a comma, though some software may allow semicolons or line returns _(note also that some applications may change the appearance of this delimiter as well, such as Photoshop changing your commas to semicolons)_. To maintain backward compatibility, no single value should exceed 64 characters. Values from the controlled vocabulary IPTC Subject Codes must be placed into the “Subject Code” field.
> ...


As a part of the IPTC Core, Keywords are not in the XMP Section, but in the IPTC Section of the Header. 
Understanding that metadata is a well thought out set of standards applied not only by LR but universally.


----------



## Sandyjas (Aug 13, 2015)

Roelof Moorlag said:


> 35 keywords is no problem at all (is my experience). I don't know of any formal limits.
> 
> If you want to 'touch' the file directly than Bridge is more handy in my opinion. You can write Keywords into the metadata of the file directly and/or read those from other applications wihtout extra actions.



Thank You So Much for your help in this.  

Thank You Again,

Sandy


----------



## Sandyjas (Aug 13, 2015)

So the Header is separate from the part of the file that has all the image picture data.  And adding extra metadata to a file, in no way compromises the integrity of the file itself into the future.  Thank You for all the in-depth information.  Thank You So Much for your help.

Thank You,

Sandy


----------



## clee01l (Aug 13, 2015)

Sandyjas said:


> So the Header is separate from the part of the file that has all the image picture data.  And adding extra metadata to a file, in no way compromises the integrity of the file itself into the future.  Thank You for all the in-depth information.  Thank You So Much for your help.
> 
> Thank You,
> 
> Sandy


Yes, this is correct.  As long as the header block conforms to published rules (EXIF standards), the integrity of the file  remains intact.  This is also why you can not update the header section of proprietary RAW files.  The rules are not public and the contents of the RAW file header can not be modified to extend beyond the manufacturers unpublished specifications.


----------



## Sandyjas (Aug 14, 2015)

Thank You again for all the help,

Thank You,

Sandy


----------

