klauspost/rawspeed — pull request #20 by pedrocr (2014-06-22 01:38:58+00:00)
Title: Add a decoder for the Leaf .MOS format

A decoder for the Leaf MOS format, tested against the Leaf Aptus 22 file available on rawsamples.ch. The format turns out to be mostly a straight 16 bit tiff. The difficult thing is that the metadata is almost all in a XMP blob inside the tiff. I "parsed" enough of it to get the make and model out. Using the full XML library is probably a bad idea here as it exposes too much code to potentially hostile files. I did a very simple strstr() based search for the and tags and used their values in place.