[ImageJ-devel] Accessing metadata from C
Curtis Rueden
ctrueden at wisc.edu
Tue Oct 22 11:10:07 CDT 2013
Hi Luc,
> I cannot figure out how to access metadata('Info') in a TIFF file,
> without launching ImageJ in batch mode to call getMetadata('Info')
> ...
>
> Is it possible with FreeImage or any other C library ?..
The metadata text is written out to the TIFF using custom tags 50838 and
50839.
Using libtiff's tiffinfo command line tool, you'll see something like:
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
Which must then be decoded to a string.
Source code at:
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/TiffDecoder.java#L43
Regards,
Curtis
P.S. Looks like someone submitted a patch to support this in Pillow, but it
is not yet merged:
https://github.com/python-imaging/Pillow/issues/291. Who knows what other
software already supports it.
On Tue, Oct 22, 2013 at 10:30 AM, Luc Deschenaux <luc at miprosoft.com> wrote:
> Hi,
>
> I cannot figure out how to access metadata('Info') in a TIFF file, without
> launching ImageJ in batch mode to call getMetadata('Info') ...
>
> Is it possible with FreeImage or any other C library ?..
>
> Regards,
>
> Luc
>
> ______________________________**_________________
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net
> http://imagej.net/mailman/**listinfo/imagej-devel<http://imagej.net/mailman/listinfo/imagej-devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20131022/c05f8e90/attachment.html>
More information about the ImageJ-devel
mailing list