Symbian3/SDK/Source/GUID-1FC88405-616F-5ED1-A136-9FE1E9226F0E.dita
changeset 13 48780e181b38
parent 8 ae94777fff8f
equal deleted inserted replaced
12:80ef3a206772 13:48780e181b38
     7     Nokia Corporation - initial contribution.
     7     Nokia Corporation - initial contribution.
     8 Contributors: 
     8 Contributors: 
     9 -->
     9 -->
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept xml:lang="en" id="GUID-1FC88405-616F-5ED1-A136-9FE1E9226F0E"><title>Exif Utility Library Guide</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>Exif (Exchangeable image file format) is a standard specifying rules for storing metadata in digital image files, mainly those using JPEG compression. </p> <section id="GUID-3333CA2A-EF84-5E7B-B9BE-8FF00523897F-GENID-1-10-1-19-1-1-5-1-6-1-7-1-4-1-2-2"><title>Purpose</title> <p>Exif enhances the JPEG and TIFF specifications with the addition of metadata tags to hold information such as the camera settings used to take the picture. </p> </section> <section><title>Exif Overview</title> <p>The Exif standard defines a wide range of metadata tags, some of which are listed below: </p> <ul><li id="GUID-55D72AF0-DEB5-55FE-AD34-52B14DD39590"><p>Date and time information of the image captured. </p> </li> <li id="GUID-DE117EE6-9465-59CD-A5C2-1FAECBF6DFE0"><p>Camera settings like camera model and make, and information that varies with each image such as orientation, aperture, shutter speed, focal length, metering mode, and film speed information. </p> </li> <li id="GUID-6F02CD74-00C5-5574-A3A2-45DB997F9AD4"><p>A thumbnail for previewing the picture on camera LCD. </p> </li> <li id="GUID-BB16459B-A734-5E3D-A632-CF8AFB31398F"><p>Copyright information. </p> </li> </ul> <p><b> Accessing Exif Metadata</b> </p> <p>Access to Exif metadata is provided through an abstract interface available in all the main ICL APIs. This interface can be implemented and managed through an ICL plugin, exhibiting the functionality to the client through the plugin extension mechanism. </p> <p>The <xref href="GUID-D3846471-6576-3080-A0C0-C1531DD6DAA3.dita"><apiname>MExifMetaData</apiname></xref> class is a generic interface for accessing the Exif metadata. To access a specific item of a metadata, both tag ID and the primary Image File Directory [IFD] number must be provided in the <xref href="GUID-D3846471-6576-3080-A0C0-C1531DD6DAA3.dita"><apiname>MExifMetaData</apiname></xref> access method, as some tags may appear in more than one IFD. The primary IFD number may either be 0 or 1. The main image tags are grouped together under IFD 0 and the tags for the thumbnail images are grouped under IFD 1 in the Exif metadata. The tags under these IFD can be further classified into sub IFD: </p> <p>For example : Tags related to the GPS can be sorted to form a group. </p> <p>The <xref href="GUID-D3846471-6576-3080-A0C0-C1531DD6DAA3.dita"><apiname>MExifMetaData</apiname></xref> is compounded by two classes as mentioned below: </p> <ul><li id="GUID-607A6DAE-75E0-56CD-8601-E360272D4CB3"><p> <xref href="GUID-B742FC40-2D88-3E71-8F89-FCB15A2C6619.dita"><apiname>MExifMetadataReader</apiname></xref> : This provides more generic functionalitites to read the tags from the Exif Metadata. The user is expected to provide the tag id and the primary IFD for the tags that needs to be read. </p> </li> <li id="GUID-0174AF96-9024-5FC1-BC04-4799C4F04CC0"><p> <xref href="GUID-27F068D2-F5BE-3D0B-83F4-493A783CFB80.dita"><apiname>MExifMetadataWriter</apiname></xref> : This is a generic way to write or set the tags of the Exif metadata. Here also the user is expected to render the key inputs like tag id and IFD for the data that needs to be written or modified. </p> </li> </ul> <p>The access provided by <xref href="GUID-D3846471-6576-3080-A0C0-C1531DD6DAA3.dita"><apiname>MExifMetaData</apiname></xref> is quite low level. The users are expected to know the tag IDs defined in the Exif specification in order to use it. Hence more user friendly classes as listed below are made available to access these tags. </p> </section> <section><title>Examples</title> <p>This section contains code snippets showing how Exif metadata is accessed in several situations. </p> <p><b>JPEG Exif Plugin</b> </p> <ul><li id="GUID-0D60F5DD-FFCD-51F5-BC57-9FB04500147F"><p> <xref href="GUID-8AA987C9-456B-3E7C-95C2-C5578EE977B9.dita"><apiname>TExifReaderUtility</apiname></xref> : This class provides a user friendly interface for reading the metadata in Exif encoded image files. The following example code illustrates its use: </p> <codeblock id="GUID-15B5C5BE-4021-55A9-99AD-77745A571863" xml:space="preserve">void CIclExample::AccessToEXIFMetadataL(const TDesC&amp; aFileName)
    12 <concept xml:lang="en" id="GUID-1FC88405-616F-5ED1-A136-9FE1E9226F0E"><title>Exif Utility Library Guide</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>Exif (Exchangeable image file format) is a standard specifying rules for storing metadata in digital image files, mainly those using JPEG compression. </p> <section id="GUID-3333CA2A-EF84-5E7B-B9BE-8FF00523897F-GENID-1-10-1-21-1-1-6-1-6-1-7-1-4-1-2-2"><title>Purpose</title> <p>Exif enhances the JPEG and TIFF specifications with the addition of metadata tags to hold information such as the camera settings used to take the picture. </p> </section> <section><title>Exif Overview</title> <p>The Exif standard defines a wide range of metadata tags, some of which are listed below: </p> <ul><li id="GUID-55D72AF0-DEB5-55FE-AD34-52B14DD39590"><p>Date and time information of the image captured. </p> </li> <li id="GUID-DE117EE6-9465-59CD-A5C2-1FAECBF6DFE0"><p>Camera settings like camera model and make, and information that varies with each image such as orientation, aperture, shutter speed, focal length, metering mode, and film speed information. </p> </li> <li id="GUID-6F02CD74-00C5-5574-A3A2-45DB997F9AD4"><p>A thumbnail for previewing the picture on camera LCD. </p> </li> <li id="GUID-BB16459B-A734-5E3D-A632-CF8AFB31398F"><p>Copyright information. </p> </li> </ul> <p><b> Accessing Exif Metadata</b> </p> <p>Access to Exif metadata is provided through an abstract interface available in all the main ICL APIs. This interface can be implemented and managed through an ICL plugin, exhibiting the functionality to the client through the plugin extension mechanism. </p> <p>The <xref href="GUID-D3846471-6576-3080-A0C0-C1531DD6DAA3.dita"><apiname>MExifMetaData</apiname></xref> class is a generic interface for accessing the Exif metadata. To access a specific item of a metadata, both tag ID and the primary Image File Directory [IFD] number must be provided in the <xref href="GUID-D3846471-6576-3080-A0C0-C1531DD6DAA3.dita"><apiname>MExifMetaData</apiname></xref> access method, as some tags may appear in more than one IFD. The primary IFD number may either be 0 or 1. The main image tags are grouped together under IFD 0 and the tags for the thumbnail images are grouped under IFD 1 in the Exif metadata. The tags under these IFD can be further classified into sub IFD: </p> <p>For example : Tags related to the GPS can be sorted to form a group. </p> <p>The <xref href="GUID-D3846471-6576-3080-A0C0-C1531DD6DAA3.dita"><apiname>MExifMetaData</apiname></xref> is compounded by two classes as mentioned below: </p> <ul><li id="GUID-607A6DAE-75E0-56CD-8601-E360272D4CB3"><p> <xref href="GUID-B742FC40-2D88-3E71-8F89-FCB15A2C6619.dita"><apiname>MExifMetadataReader</apiname></xref> : This provides more generic functionalitites to read the tags from the Exif Metadata. The user is expected to provide the tag id and the primary IFD for the tags that needs to be read. </p> </li> <li id="GUID-0174AF96-9024-5FC1-BC04-4799C4F04CC0"><p> <xref href="GUID-27F068D2-F5BE-3D0B-83F4-493A783CFB80.dita"><apiname>MExifMetadataWriter</apiname></xref> : This is a generic way to write or set the tags of the Exif metadata. Here also the user is expected to render the key inputs like tag id and IFD for the data that needs to be written or modified. </p> </li> </ul> <p>The access provided by <xref href="GUID-D3846471-6576-3080-A0C0-C1531DD6DAA3.dita"><apiname>MExifMetaData</apiname></xref> is quite low level. The users are expected to know the tag IDs defined in the Exif specification in order to use it. Hence more user friendly classes as listed below are made available to access these tags. </p> </section> <section><title>Examples</title> <p>This section contains code snippets showing how Exif metadata is accessed in several situations. </p> <p><b>JPEG Exif Plugin</b> </p> <ul><li id="GUID-0D60F5DD-FFCD-51F5-BC57-9FB04500147F"><p> <xref href="GUID-8AA987C9-456B-3E7C-95C2-C5578EE977B9.dita"><apiname>TExifReaderUtility</apiname></xref> : This class provides a user friendly interface for reading the metadata in Exif encoded image files. The following example code illustrates its use: </p> <codeblock id="GUID-15B5C5BE-4021-55A9-99AD-77745A571863" xml:space="preserve">void CIclExample::AccessToEXIFMetadataL(const TDesC&amp; aFileName)
    13     {
    13     {
    14     HBufC8* buffer8Bit=NULL;
    14     HBufC8* buffer8Bit=NULL;
    15     
    15     
    16     // If the image is not recognised or valid then the call will leave with an error
    16     // If the image is not recognised or valid then the call will leave with an error
    17     CJPEGExifDecoder* exifdecoder =  static_cast&lt;CJPEGExifDecoder*&gt;(CJPEGExifDecoder::FileNewL(iFs, aFileName/*,CImageDecoder::EOptionNone, KNullUid, KNullUid, KUidICLJpegEXIFInterface*/));
    17     CJPEGExifDecoder* exifdecoder =  static_cast&lt;CJPEGExifDecoder*&gt;(CJPEGExifDecoder::FileNewL(iFs, aFileName/*,CImageDecoder::EOptionNone, KNullUid, KNullUid, KUidICLJpegEXIFInterface*/));