3 * Copyright (C) 2002 Lutz Müller <lutz@users.sourceforge.net>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
25 #include <libexif/exif-data.h>
26 #include <libexif/exif-ifd.h>
29 main (int argc, char **argv)
36 printf ("Creating EXIF data...\n");
37 ed = exif_data_new ();
39 printf ("Creating EXIF entry...\n");
40 e = exif_entry_new ();
41 exif_content_add_entry (ed->ifd[EXIF_IFD_0], e);
42 exif_entry_initialize (e, EXIF_TAG_EXIF_VERSION);
44 printf ("Creating another EXIF entry...\n");
45 e = exif_entry_new ();
46 exif_content_add_entry (ed->ifd[EXIF_IFD_0], e);
47 exif_entry_initialize (e, EXIF_TAG_DATE_TIME);
49 printf ("Creating an EXIF entry in the EXIF IFD...\n");
50 e = exif_entry_new ();
51 exif_content_add_entry (ed->ifd[EXIF_IFD_EXIF], e);
52 exif_entry_initialize (e, EXIF_TAG_FLASH_PIX_VERSION);
56 printf ("Saving EXIF data to memory...\n");
57 exif_data_save_data (ed, &eb, &ebs);
60 printf ("Loading EXIF data from memory...\n");
61 ed = exif_data_new_from_data (eb, ebs);