Writing metadata into image file.

Want to talk about something that isn't covered by another category?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Simon Knight
Posts: 845
Joined: Wed Nov 04, 2009 11:41 am
Location: Gunthorpe, North Lincs, UK

Writing metadata into image file.

Post by Simon Knight » Sat May 21, 2022 11:33 am

Hi,

As I'm sure you know image files often have a large amount of meta data associated with them. With the advent of the raw image this metadata along with processing data has been stored in so called sidecar files which are normally small text files. The most well known is Adobe's xmp file which I believe is an open format and defined in an ISO standards document. These sidecar files are associated with the image file they describe by having the same file name plus a different extension and being stored in the same folder with the original image.

There is a commonly held belief that raw files should remain unedited except perhaps for a change of name. It is simple to find posts where it is said that it is not possible to edit camera raws because the format of the files is closed and unpublished. However in reality this concept is an urban myth rather than an absolute truth. Some while ago Adobe created a new file format named digital negative (extension dng). These are created by Adobe applications and convert camera raw files into a single open (I think) file format. One of the features of the dng files is that meta data can be written into the file by design. On inspection it becomes clear that dng is based on the Tiff file specification which also allows meta data to be stored within the image file.

I have converted my images to dng so have the option of storing keywords and ratings within the file rather than in a sidecar file. My concern is that I have read that there is a risk of corrupting the file while it is being written. Now this is probably true but no figures are ever offered to define the level of risk. I'm at the point of concluding that the risk is very very small and worth taking to avoid a multitude of sidecar files. So my question is aimed at anyone with some knowledge of how filesystems work : how likely is a file to be corrupted while being written to disc?

And to close and really start an argument the great majority of raw image files are also based on tiff which means that tools such as exiftool can write metadata to them.

S
best wishes
Skids

PaulDaMacMan
Posts: 616
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: Writing metadata into image file.

Post by PaulDaMacMan » Tue May 24, 2022 9:56 pm

Correct, since 2012 XMP is an ISO standard.
https://www.iso.org/standard/75163.html

For the question about image corruption... I would think that still depends on a bunch of factors, like which filesystem are you using (HFS,FAT32,ZFS,NFS, etc.)? What OS are you using? What software is writing the converted file to the file system? etc. etc. Probably the biggest factor is the quality of the disk / physical storage medium itself. I remember back in the day in printing we would get the occasionally corruption with a massive TIFF file or two. Massive being 2400dpi for printing 200line and then scaled up to bus-sign or small billboard size, so like 400-500MB uncompressed. Back then storage was things like a JAZZ Drive, or Magento Optical Disc, or whatever... and it could take a half of an hour or more just to write the file to disk... I would think that todays storage tech would have lower risk. Of course if you are sneaker-net moving files around on a 12 year old thumb drive that you've erased 10,0000 times, then you might get some file corruption.

Of course you could just make a backup copy, and then inspect all of your converted files before deleting the originals.
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

Post Reply

Return to “Off-Topic”