<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear OME,<br>
<br>
I have for some time now been finding myself switching back to bfconvert version 4 when dealing with 16-bit microscopy images.<br>
<br>
The reason for this is that bfconvert version 5 produces tiff images that cannot be parsed by the freeimage library.<br>
<br>
Today I thought I'd spend a little bit of time trying to work out what is going on and send a query to your mailing list.<br>
<br>
The error that I get from freeimage is:<br>
<br>
FreeImage error: Unable to handle this format: bitspersample = 16, samplesperpixel = 1, photometric = 3<br>
<br>
I suspect that this has to do with the photmetric flag, which I don't really know anything about.<br>
However, looking through the freeimage source code I think it can be traced to the<br>
"<span class="pl-en">IsValidBitsPerSample" function on line 1079<br>
<br>
<a href="https://github.com/imazen/freeimage/blob/master/Source/FreeImage/PluginTIFF.cpp#L1097" target="_blank">https://github.com/imazen/freeimage/blob/master/Source/FreeImage/PluginTIFF.cpp#L1097</a><br>
<br>
In particular the check for the whether or not the "photometric" is a "PHOTOMETRIC_PALETTE" on line 1111.<br>
<br>
<a href="https://github.com/imazen/freeimage/blob/master/Source/FreeImage/PluginTIFF.cpp#L1111" target="_blank">https://github.com/imazen/freeimage/blob/master/Source/FreeImage/PluginTIFF.cpp#L1111</a><br>
</span><br>
Inspecting the content of the TIFF files generated using bfconvert it seems that one difference between version 4 and 5 is that the former has a photometric interpretation "BlackIsZero" and the latter "RGB Palette".<br>
<br>
Was this change in going from version 4 to 5 intentional?<br>
What was the rationale?<br>
<br>
I would love to be able to use newer versions of bfconvert on 16-bit micoscopy files and parse the files using freeimage.<br>
<br>
Do you think this will be possible in the future?<br>
<br>
Versions used here:<br>
<br>
Version: 4.4.2<br>
VCS revision: c2322fc<br>
Build date: 25 August 2012<br>
<br>
Version: 5.0.6<br>
VCS revision: 33b1150<br>
Build date: 10 November 2014<br>
<br>
Kind regards,<br>
<br>
Tjelvar<br>
<br>
<br>
</div>
</body>
</html>