From 81f142edb594d703a09c10ff6ca35c2d4f68e3b0 Mon Sep 17 00:00:00 2001 From: Lutz Mueller Date: Sat, 30 Apr 2005 03:17:28 +0200 Subject: [PATCH] 2005-04-30 Lutz Mueller * test/test-mem.c: Show how to create EXIF data. * README: New section USAGE. --- ChangeLog | 5 +++++ README | 16 ++++++++++------ test/test-mem.c | 20 +++----------------- 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 72e5334..0ab4a56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2005-04-30 Lutz Mueller + * test/test-mem.c: Show how to create EXIF data. + * README: New section USAGE. + +2005-04-30 Lutz Mueller + * 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 --- 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 +() 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 ------- diff --git a/test/test-mem.c b/test/test-mem.c index 9b6bd1f..6218f71 100644 --- a/test/test-mem.c +++ b/test/test-mem.c @@ -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); -- 2.7.4