3 * Copyright 2002 Lutz M\uffffller <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., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301 USA.
21 #include <libexif/exif-utils.h>
22 #include <libexif/exif-data.h>
33 ExifSRational r
= {1., 20.};
38 printf ("Error running exif_data_new()\n");
42 e
= exif_entry_new ();
44 printf ("Error running exif_entry_new()\n");
48 exif_content_add_entry (d
->ifd
[EXIF_IFD_0
], e
);
49 exif_entry_initialize (e
, EXIF_TAG_SHUTTER_SPEED_VALUE
);
50 exif_set_srational (e
->data
, exif_data_get_byte_order (d
), r
);
52 for (i
= 30; i
> 0; i
--) {
53 printf ("Length %2i: '%s'\n", i
,
54 exif_entry_get_value (e
, v
, i
));