It seems that the issue I had with building was the similar to https://stackoverflow.com/questions/22922585/problems-linking-freeimage-3-16-0-using-make-and-clang-on-mac-os-x-10-8 It looks like manually running gensrclist.sh doesn't add that file either. Either manually adding the file or adding the define as in the stackoverflow answers fixes this.
Thanks Hervé, Here's the PluginRAW.cpp file modified. This adds support for getting the metadata when loading with FIF_LOAD_NOPIXELS, plus additional for output size, frame offset, rotation/flip and aspect ratio (for rectangular pixels). It also lets one access the black level when loading with RAW_UNPROCESSED. I've commented out the stuff that needs a LibRaw update. That adds support for getting the "fuji width" parameter, and the scale and outcam matrix. Feel free to tell me it's a mess, it was...
Thanks Hervé, Here's the PluginRAW.cpp file modified. This adds support for getting the metadata when loading with FIF_LOAD_NOPIXELS, plus additional for output size, frame offset, rotation/flip and aspect ratio (for rectangular pixels). It also lets one access the black level when loading with RAW_UNPROCESSED. I've commented out the stuff that needs a LibRaw update. That adds support for getting the "fuji width" parameter, and the scale and outcam matrix. Feel free to tell me it's a mess, it was...
Here's an updated patch that I'm using, again I don't expect it to be merged. I've edited the GNU Makefile to be able to build on macOS as for some reason the macOS one doesn't work for me.
Additional RAW metadata
Unless somewhere there is an official documentation allowing this kind of entry, I consider it being a deviation from the base TIFF specification. If that is the case then I understand FreeImage not handling this. If it helps this image was generated in Affinity Photo. I just try to understand the rationale behind FreeImage/LibTIFF's handling of the subject TIFF file I might be wrong, but I think that LibTIFF handles it fine, it's just how FreeImage interpretes the data as a FIT_BITMAP (due to that...
I think part of the problem is a missing case in the else block at https://sourceforge.net/p/freeimage/svn/HEAD/tree/FreeImage/trunk/Source/FreeImage/PluginTIFF.cpp#l588 for samplesperpixel == 2. The reason it displays as colored is that I think it's interpretting two 16 bit values as four 8 bit values. The second value is the alpha which at the centre is 100%, or 0xFFFF which is then interpreted as blue = 0xFF and alpha = 0xFF (255). The grey scale amount at the centre, which will be the first 16...
I think part of the problem is a missing case in the else block at https://sourceforge.net/p/freeimage/svn/HEAD/tree/FreeImage/trunk/Source/FreeImage/PluginTIFF.cpp#l588 for samplesperpixel == 2. The reason it displays as colored is that I think it's interpretting two 16 bit values as four 8 bit values. The second value is the alpha which at the centre is 100%, or 0xFFFF which is then iterpreted as blue = 0xFF and alpha = 0xFF (255). The grey scale amount at the centre, which will be the first 16...