<div dir="ltr">Hi Luc,<div><br></div><div><div>> I cannot figure out how to access metadata('Info') in a TIFF file,</div><div>> without launching ImageJ in batch mode to call getMetadata('Info')</div>
<div>> ...</div><div>> </div><div>> Is it possible with FreeImage or any other C library ?..</div></div><div><br></div><div>The metadata text is written out to the TIFF using custom tags 50838 and 50839.</div><div>
<br></div><div>Using libtiff's tiffinfo command line tool, you'll see something like:</div><div><br></div><div> Tag 50839: 73,74,73,74,105,110,102,111,0,0,0,1,0,72,0,101,0,108,0,108,0,111,0,32,0,119,0,111,0,114,0,108,0,100,0,46,0,46,0,46,0,10,0,71,0,114,0,101,0,97,0,116,0,46<br>
</div><div><br></div><div>Which must then be decoded to a string.</div><div><br></div><div>Source code at:</div><div><a href="https://github.com/fiji/ImageJA/blob/v1.48e/src/main/java/ij/io/TiffEncoder.java#L355">https://github.com/fiji/ImageJA/blob/v1.48e/src/main/java/ij/io/TiffEncoder.java#L355</a><br>
</div><div><a href="https://github.com/fiji/ImageJA/blob/v1.48e/src/main/java/ij/io/TiffDecoder.java#L43">https://github.com/fiji/ImageJA/blob/v1.48e/src/main/java/ij/io/TiffDecoder.java#L43</a><br></div><div><br></div><div>
Regards,</div><div>Curtis</div><div><br></div><div>P.S. Looks like someone submitted a patch to support this in Pillow, but it is not yet merged:</div><div><a href="https://github.com/python-imaging/Pillow/issues/291">https://github.com/python-imaging/Pillow/issues/291</a>. Who knows what other software already supports it.<br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 22, 2013 at 10:30 AM, Luc Deschenaux <span dir="ltr"><<a href="mailto:luc@miprosoft.com" target="_blank">luc@miprosoft.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I cannot figure out how to access metadata('Info') in a TIFF file, without launching ImageJ in batch mode to call getMetadata('Info') ...<br>
<br>
Is it possible with FreeImage or any other C library ?..<br>
<br>
Regards,<br>
<br>
Luc<br>
<br>
______________________________<u></u>_________________<br>
ImageJ-devel mailing list<br>
<a href="mailto:ImageJ-devel@imagej.net" target="_blank">ImageJ-devel@imagej.net</a><br>
<a href="http://imagej.net/mailman/listinfo/imagej-devel" target="_blank">http://imagej.net/mailman/<u></u>listinfo/imagej-devel</a><br>
</blockquote></div><br></div>