From: Lutz M. <lu...@us...> - 2005-04-30 01:17:38
|
Update of /cvsroot/libexif/libexif/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14550/test Modified Files: test-mem.c Log Message: 2005-04-30 Lutz Mueller <lu...@us...> * test/test-mem.c: Show how to create EXIF data. * README: New section USAGE. Index: test-mem.c =================================================================== RCS file: /cvsroot/libexif/libexif/test/test-mem.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -p -d -r1.8 -r1.9 --- test-mem.c 10 Mar 2005 21:17:57 -0000 1.8 +++ test-mem.c 30 Apr 2005 01:17:28 -0000 1.9 @@ -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); |