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>
28 main (int argc, char **argv)
35 printf ("Creating EXIF data...\n");
36 ed = exif_data_new ();
38 printf ("Creating EXIF entry...\n");
39 e = exif_entry_new ();
40 exif_content_add_entry (ed->ifd0, e);
41 exif_entry_initialize (e, EXIF_TAG_EXIF_VERSION);
43 printf ("Creating another EXIF entry...\n");
44 e = exif_entry_new ();
45 exif_content_add_entry (ed->ifd0, e);
46 exif_entry_initialize (e, EXIF_TAG_DATE_TIME);
48 printf ("Creating an EXIF entry in the EXIF IFD...\n");
49 e = exif_entry_new ();
50 exif_content_add_entry (ed->ifd_exif, e);
51 exif_entry_initialize (e, EXIF_TAG_FLASH_PIX_VERSION);
55 printf ("Saving EXIF data to memory...\n");
56 exif_data_save_data (ed, &eb, &ebs);
59 printf ("Loading EXIF data from memory...\n");
60 ed = exif_data_new_from_data (eb, ebs);