  
    
main.htmlMain Page     
classes.htmlData Structures     
files.htmlFiles     
dirs.htmlDirectories   
  
    
files.htmlFile List     
globals.htmlGlobals   
dir_20715630405f3b63e7ab7a5c713843d9.htmllibexif exif-format.c
exif-format_8c.htmlGo to the documentation of this file. 00001 /* exif-format.c 00002  * 00003  * Copyright © 2001 Lutz Müller <lutz@users.sourceforge.net> 00004  * 00005  * This library is free software; you can redistribute it and/or 00006  * modify it under the terms of the GNU Lesser General Public 00007  * License as published by the Free Software Foundation; either 00008  * version 2 of the License, or (at your option) any later version. 00009  * 00010  * This library is distributed in the hope that it will be useful, 00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 00013  * Lesser General Public License for more details. 00014  * 00015  * You should have received a copy of the GNU Lesser General Public 00016  * License along with this library; if not, write to the 00017  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018  * Boston, MA 02111-1307, USA. 00019  */ 00020 
00021 #include <config.h> 00022 
00023 #include < exif-format_8h.htmllibexif/exif-format.h > 00024 #include < i18n_8h.htmllibexif/i18n.h > 00025 
00026 #include <stdlib.h> 00027 
00028 static struct {
exif-format_8c.html#822b1c4c8023ab88c62ef13a295cc9f400029          exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd1ExifFormat  exif-format_8c.html#822b1c4c8023ab88c62ef13a295cc9f4format ;
exif-format_8c.html#c9ef026b2193e5a22a4fe38bf420671300030          const char * mnote-canon-entry_8c.html#f7de737402a426cb055e20e44007597dname ;
exif-format_8c.html#c1953082f2467dad4bbec15ebbc57a2100031          unsigned char exif-format_8c.html#c1953082f2467dad4bbec15ebbc57a21size ;
00032 } exif-format_8c.html#7e1173fd9b3d49d0158d46fe8f036086ExifFormatTable [] = {
00033         { exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd10fe99fc897d3c96ff849052179d880f1EXIF_FORMAT_BYTE ,      i18n_8h.html#3a5ebfb532ab1a97cf24a0c0320b9c58N_ ("Byte"),      1},
00034         { exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd1ed05b7fe35145d01244085c176001486EXIF_FORMAT_ASCII ,     i18n_8h.html#3a5ebfb532ab1a97cf24a0c0320b9c58N_ ("Ascii"),     1},
00035         { exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd16187ddb8892af4772728e34118b26a4fEXIF_FORMAT_SHORT ,     i18n_8h.html#3a5ebfb532ab1a97cf24a0c0320b9c58N_ ("Short"),     2},
00036         { exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd1b6f3a3c87b514af859dc91a1a1760f51EXIF_FORMAT_LONG ,      i18n_8h.html#3a5ebfb532ab1a97cf24a0c0320b9c58N_ ("Long"),      4},
00037         { exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd19a07d82ff9979f0c075ca5c6292935d7EXIF_FORMAT_RATIONAL ,  i18n_8h.html#3a5ebfb532ab1a97cf24a0c0320b9c58N_ ("Rational"),  8},
00038         { exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd10bbab1df6335f476eb0cf73eb1a5985aEXIF_FORMAT_SBYTE ,     i18n_8h.html#3a5ebfb532ab1a97cf24a0c0320b9c58N_ ("SByte"),     1},
00039         { exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd174d803878ec7ffd34158ef9cc5be8714EXIF_FORMAT_SSHORT ,    i18n_8h.html#3a5ebfb532ab1a97cf24a0c0320b9c58N_ ("SShort"),    2},
00040         { exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd13666b762166f1082f02d092c3fb387fbEXIF_FORMAT_SLONG ,     i18n_8h.html#3a5ebfb532ab1a97cf24a0c0320b9c58N_ ("SLong"),     4},
00041         { exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd1e9eddc5849e3352d58633256ac10caf1EXIF_FORMAT_SRATIONAL , i18n_8h.html#3a5ebfb532ab1a97cf24a0c0320b9c58N_ ("SRational"), 8},
00042         { exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd11c437fce10fbe2d83f4451967fef5a6eEXIF_FORMAT_FLOAT ,     i18n_8h.html#3a5ebfb532ab1a97cf24a0c0320b9c58N_ ("Float"),     4},
00043         { exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd179f5509a60cefa8689cc4ae055f23318EXIF_FORMAT_DOUBLE ,    i18n_8h.html#3a5ebfb532ab1a97cf24a0c0320b9c58N_ ("Double"),    8},
00044         { exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd1a52e87eea3c82b9ef481cb68b95843e2EXIF_FORMAT_UNDEFINED , i18n_8h.html#3a5ebfb532ab1a97cf24a0c0320b9c58N_ ("Undefined"), 1},
00045         {0, NULL, 0}
00046 };
00047 
00048 const char *
exif-format_8h.html#4f5c75106bce78a857bf1ad61cae2f1600049  exif-format_8c.html#4f5c75106bce78a857bf1ad61cae2f16exif_format_get_name  ( exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd1ExifFormat  exif-format_8c.html#822b1c4c8023ab88c62ef13a295cc9f4format )
00050 {
00051         unsigned int i;
00052 
00053         /* FIXME: This belongs to somewhere else. */ 00054         /* libexif should use the default system locale. 00055          * If an application specifically requires UTF-8, then we 00056          * must give the application a way to tell libexif that. 00057          * 00058          * bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 00059          */ 00060         i18n_8h.html#49158295fb1f28fd518de4ac881d5d3cbindtextdomain  (GETTEXT_PACKAGE, LOCALEDIR);
00061 
00062         for (i = 0; exif-format_8c.html#7e1173fd9b3d49d0158d46fe8f036086ExifFormatTable [i].name; i++)
00063                 if ( exif-format_8c.html#7e1173fd9b3d49d0158d46fe8f036086ExifFormatTable [i].format == format)
00064                         return i18n_8h.html#709240620a80c25aca1c4e2576c3cba8_ ( exif-format_8c.html#7e1173fd9b3d49d0158d46fe8f036086ExifFormatTable [i]. mnote-canon-entry_8c.html#f7de737402a426cb055e20e44007597dname );
00065         return NULL;
00066 }
00067 
00068 unsigned char exif-format_8h.html#0cd0c832a16f47c39d50aeaeb6c07e8300069  exif-format_8c.html#0cd0c832a16f47c39d50aeaeb6c07e83exif_format_get_size  ( exif-format_8h.html#b34eef28c00c9728719334fa6a37bcd1ExifFormat  exif-format_8c.html#822b1c4c8023ab88c62ef13a295cc9f4format )
00070 {
00071         unsigned int i;
00072 
00073         for (i = 0; exif-format_8c.html#7e1173fd9b3d49d0158d46fe8f036086ExifFormatTable [i].size; i++)
00074                 if ( exif-format_8c.html#7e1173fd9b3d49d0158d46fe8f036086ExifFormatTable [i].format == format)
00075                         return exif-format_8c.html#7e1173fd9b3d49d0158d46fe8f036086ExifFormatTable [i]. exif-format_8c.html#c1953082f2467dad4bbec15ebbc57a21size ;
00076         return 0;
00077 }
Generated on Sun Apr 23 01:22:39 2006 for EXIF library (libexif) Internals by 
http://www.doxygen.org/index.htmldoxygen  1.4.6 