2005-04-30 Lutz Mueller <lutz@users.sourceforge.net>
authorLutz Mueller <lutz.s.mueller@gmail.com>
Sat, 30 Apr 2005 01:17:28 +0000 (03:17 +0200)
committerLutz Mueller <lutz.s.mueller@gmail.com>
Sat, 30 Apr 2005 01:17:28 +0000 (03:17 +0200)
* test/test-mem.c: Show how to create EXIF data.
* README: New section USAGE.

ChangeLog
README
test/test-mem.c

index 72e5334..0ab4a56 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2005-04-30  Lutz Mueller <lutz@users.sourceforge.net>
 
+       * test/test-mem.c: Show how to create EXIF data.
+       * README: New section USAGE.
+
+2005-04-30  Lutz Mueller <lutz@users.sourceforge.net>
+
        * libexif/exif-data-type.h: New
        * libexif/*: Lots of changes to make it possible to validate data against
        the specification.
diff --git a/README b/README
index 6b270a6..da94228 100644 (file)
--- a/README
+++ b/README
@@ -27,6 +27,16 @@ libexif can only handle some maker notes, and even those not very well. More
 work needs to be done. Note that libmnote has been merged with libexif - it
 is no longer needed.
 
+USAGE
+-----
+
+Until someone writes some documentation, you need to refer to the header 
+files. The short test-program test/test-mem illustrates how to create valid
+EXIF data from scratch, how to save EXIF data and how to load EXIF data 
+from data in memory. Don't hesitate to contact us 
+(<libexif-devel@lists.sourceforge.net>) if you've got any questions
+on how to use libexif.
+
 FRONTENDS
 ---------
 
@@ -50,12 +60,6 @@ LIBRARIES
 I know of the following libraries that use or have been inspired by libexif:
  - pel: PHP-Code (http://pel.sourceforge.net)
 
-TODO
-----
-
-We should probably support the generation of an empty EXIF structure with all
-mandatory tags. First ideas are in exif-tag.c. This has not yet been finished.
-
 AUTHORS
 -------
 
index 9b6bd1f..6218f71 100644 (file)
@@ -39,24 +39,10 @@ main (int argc, char **argv)
 
        printf ("Creating EXIF data...\n");
        ed = exif_data_new ();
+       exif_data_set_data_type (ed, EXIF_DATA_TYPE_UNCOMPRESSED_CHUNKY);
 
-       printf ("Creating EXIF entry...\n");
-       e = exif_entry_new ();
-       exif_content_add_entry (ed->ifd[EXIF_IFD_0], e);
-       exif_entry_initialize (e, EXIF_TAG_EXIF_VERSION);
-       exif_entry_unref (e);
-
-       printf ("Creating another EXIF entry...\n");
-       e = exif_entry_new ();
-       exif_content_add_entry (ed->ifd[EXIF_IFD_0], e);
-       exif_entry_initialize (e, EXIF_TAG_DATE_TIME);
-       exif_entry_unref (e);
-
-       printf ("Creating an EXIF entry in the EXIF IFD...\n");
-       e = exif_entry_new ();
-       exif_content_add_entry (ed->ifd[EXIF_IFD_EXIF], e);
-       exif_entry_initialize (e, EXIF_TAG_FLASH_PIX_VERSION);
-       exif_entry_unref (e);
+       printf ("Fill EXIF data with all necessary entries to follow specs...\n");
+       exif_data_fix (ed);
 
        exif_data_dump (ed);