From 1e355114311d7bf44b96b11b745857a2b68e8a06 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sat, 2 Aug 2008 13:50:16 +0200 Subject: Port to exiv2 library Now we are able to read EXIF, IPTC and JPEG metadata such as caption, copyright, author etc. though we don't display them anywhere yet. Fixes weird shutter times. --- jpeg-utils.h | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'jpeg-utils.h') diff --git a/jpeg-utils.h b/jpeg-utils.h index 56bb51d..4c47d3c 100644 --- a/jpeg-utils.h +++ b/jpeg-utils.h @@ -15,9 +15,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifdef __cplusplus + extern "C" { +#endif + #include +/* TODO: we want to have numerical values here at some point in the future */ typedef struct { char *datetime; char *camera_model; @@ -27,15 +33,27 @@ typedef struct { char *aperture; char *exposure; char *flash; - unsigned long width; - unsigned long height; + + char *exif_software; + char *exif_imgdesc; + char *exif_artist; + char *exif_copyright; + char *exif_usercomment; + + char *iptc_objectname; + char *iptc_copyright; + char *iptc_credit; + char *iptc_caption; + char *iptc_author; + + char *jpeg_comment; } TExifData; /* * get_exif: retrieve EXIF info from a JPEG image */ -int get_exif (const char *filename, TExifData *data); +int get_exif (const char *filename, TExifData **exif_data); /* * free_exif_struct: free allocated structure @@ -63,3 +81,7 @@ void get_image_sizes (const char *img, void calculate_sizes (const unsigned long max_width, const unsigned long max_height, unsigned long *width, unsigned long *height); + +#ifdef __cplusplus + } +#endif \ No newline at end of file -- cgit v1.2.3