  
    
main.htmlMain Page     
classes.htmlData Structures     
files.htmlFiles     
dirs.htmlDirectories   
  
    
files.htmlFile List     
globals.htmlGlobals   
dir_3c4fde49625df9344590fff295c7c38d.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#bd06ced5b3e334726a446807ba75b6c800029          exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d2ExifFormat  exif-format_8c.html#bd06ced5b3e334726a446807ba75b6c8format ;
exif-format_8c.html#8f8f80d37794cde9472343e4487ba3eb00030          const char * mnote-canon-entry_8c.html#5ac083a645d964373f022d03df4849c8name ;
exif-format_8c.html#ac71ffe03c84523594a575b2062849c300031          unsigned char exif-format_8c.html#ac71ffe03c84523594a575b2062849c3size ;
00032 } exif-format_8c.html#721aa27f1be1f68baf98be55915cc720ExifFormatTable [] = {
00033         { exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d2fdf39e6e5864897d50e52419fbe48356EXIF_FORMAT_BYTE ,      i18n_8h.html#75278405e7f034d2b1af80bfd94675feN_ ("Byte"),      1},
00034         { exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d28cee3caa738d8bb85311678f0cb0e868EXIF_FORMAT_ASCII ,     i18n_8h.html#75278405e7f034d2b1af80bfd94675feN_ ("Ascii"),     1},
00035         { exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d25f22efb2ec9e3bd9e29faa87cd7b64e5EXIF_FORMAT_SHORT ,     i18n_8h.html#75278405e7f034d2b1af80bfd94675feN_ ("Short"),     2},
00036         { exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d25611dcd2fcdcaf91f25412bece8485b6EXIF_FORMAT_LONG ,      i18n_8h.html#75278405e7f034d2b1af80bfd94675feN_ ("Long"),      4},
00037         { exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d22712817194f241cb15f19e5a77d2bf42EXIF_FORMAT_RATIONAL ,  i18n_8h.html#75278405e7f034d2b1af80bfd94675feN_ ("Rational"),  8},
00038         { exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d29512e4980782a9f3638e83bc47dfe58cEXIF_FORMAT_SBYTE ,     i18n_8h.html#75278405e7f034d2b1af80bfd94675feN_ ("SByte"),     1},
00039         { exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d285dbf2985c5d03f406746f0b0cf1cbbeEXIF_FORMAT_SSHORT ,    i18n_8h.html#75278405e7f034d2b1af80bfd94675feN_ ("SShort"),    2},
00040         { exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d21e5c296e5c3a2e39eeb87d0a26597f87EXIF_FORMAT_SLONG ,     i18n_8h.html#75278405e7f034d2b1af80bfd94675feN_ ("SLong"),     4},
00041         { exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d23c60fa6310f13ba77c677708ab41c29cEXIF_FORMAT_SRATIONAL , i18n_8h.html#75278405e7f034d2b1af80bfd94675feN_ ("SRational"), 8},
00042         { exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d2b8b22c7e2195872fa934308cf7b2f688EXIF_FORMAT_FLOAT ,     i18n_8h.html#75278405e7f034d2b1af80bfd94675feN_ ("Float"),     4},
00043         { exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d2f89818d5f7b2f06f25baff4657565054EXIF_FORMAT_DOUBLE ,    i18n_8h.html#75278405e7f034d2b1af80bfd94675feN_ ("Double"),    8},
00044         { exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d25ce63b2dc5a1db046bcd130bb0eff2bcEXIF_FORMAT_UNDEFINED , i18n_8h.html#75278405e7f034d2b1af80bfd94675feN_ ("Undefined"), 1},
00045         {0, NULL, 0}
00046 };
00047 
00048 const char *
exif-format_8h.html#59375a5939c716b826311c22571680f300049  exif-format_8c.html#59375a5939c716b826311c22571680f3exif_format_get_name  ( exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d2ExifFormat  exif-format_8c.html#bd06ced5b3e334726a446807ba75b6c8format )
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#dd6dfc1077058ff26d79cdb18099d58abindtextdomain  (GETTEXT_PACKAGE, LOCALEDIR);
00061 
00062         for (i = 0; exif-format_8c.html#721aa27f1be1f68baf98be55915cc720ExifFormatTable [i].name; i++)
00063                 if ( exif-format_8c.html#721aa27f1be1f68baf98be55915cc720ExifFormatTable [i].format == format)
00064                         return i18n_8h.html#32a3cf3d9dd914f5aeeca5423c157934_ ( exif-format_8c.html#721aa27f1be1f68baf98be55915cc720ExifFormatTable [i]. mnote-canon-entry_8c.html#5ac083a645d964373f022d03df4849c8name );
00065         return NULL;
00066 }
00067 
00068 unsigned char exif-format_8h.html#924038efe0cd8ebade8f44619dd794f300069  exif-format_8c.html#924038efe0cd8ebade8f44619dd794f3exif_format_get_size  ( exif-format_8h.html#761152047d73b4a9fcdc4e2051b817d2ExifFormat  exif-format_8c.html#bd06ced5b3e334726a446807ba75b6c8format )
00070 {
00071         unsigned int i;
00072 
00073         for (i = 0; exif-format_8c.html#721aa27f1be1f68baf98be55915cc720ExifFormatTable [i].size; i++)
00074                 if ( exif-format_8c.html#721aa27f1be1f68baf98be55915cc720ExifFormatTable [i].format == format)
00075                         return exif-format_8c.html#721aa27f1be1f68baf98be55915cc720ExifFormatTable [i]. exif-format_8c.html#ac71ffe03c84523594a575b2062849c3size ;
00076         return 0;
00077 }
Generated on Sun Apr 23 02:19:18 2006 for EXIF library (libexif) Internals by 
http://www.doxygen.org/index.htmldoxygen  1.4.6 