<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<?rfc compact="no"?>
<?rfc toc="yes"?>
<?rfc private="The EXIF documentation file"?>
<?rfc header="EXIF"?>

<rfc>
<front>
<title>The EXIF Package</title>

<author initials="D." surname="New" fullname="Darren New">
<organization/>
<address>
<postal>
<street>5390 Caminito Exquisito</street>
<city>San Diego</city> <region>CA</region> <code>92130</code>
<country>US</country>
</postal>
<email>dnew@san.rr.com</email>
</address>
</author>

<date month="February" year="2002" />

<abstract><t>
        Tcl EXIF extracts and parses EXIF fields from digital images.
</t></abstract>
</front>

<middle>

<section title="Synopsis">
<figure><artwork><![CDATA[
    package provide exif 1.0
]]></artwork></figure>

<t>The EXIF package is a recoding of Chris Breeze's Perl package to do the same
    thing. This version accepts a channel as input and returns a serialized
    array with all the recognised fields parsed out. </t>

<t> There is also a function to obtain a list of all possible field names that
    might be present, which is useful in building GUIs that present such
    information. </t>

</section>

<section title="Details">

<figure><artwork><![CDATA[
    array set answer [exif::analyze $channel]
]]></artwork></figure>

<t> $channel should be an open file handle rewound 
    to the start. It does not need to be seekable.
    $channel will be set to binary mode and is left
    wherever it happens to stop being parsed, usually
    at the end of the file or the start of the image
    data. You must open and close the stream yourself.
    If no error is thrown, the return value is a 
    serialized array with informative English text
    about what was found in the EXIF block. Failure
    during parsing or I/O throw errors. </t>

<figure><artwork><![CDATA[
    set names [exif::fieldnames]
]]></artwork></figure>

<t> This returns a list of all possible field names.
    That is, the array returned by exif::analyze will
    not contain keys that are not listed in the return
    from exif::fieldnames. Of course, if information is
    missing in the image file, exif::analyze may not
    return all the fields listed in the return from
    exif::fieldnames. This function is expected to be
    primarily useful for building GUIs to display results.
    N.B.: Read the implementation of exif::fieldnames
    before modifying the implementation of exif::analyze.
</t>

</section>

<section title="Copyrights">
<t>(c) 2002 Darren New</t>

<t>Hold harmless the author, and any lawful use is allowed.</t>
</section>

<section title="Acknowledgements">

<t> This code is a direct translation of version 1.3 of exif.pl by Chris
    Breeze. See the source for full headers, references, etc. </t>

</section>

</middle>

</rfc>

