3 * Copyright © 2001 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., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301 USA.
21 #ifndef __JPEG_DATA_H__
22 #define __JPEG_DATA_H__
24 #include "libjpeg/jpeg-marker.h"
26 #include <libexif/exif-data.h>
27 #include <libexif/exif-log.h>
29 typedef ExifData * JPEGContentAPP1;
31 typedef struct _JPEGContentGeneric JPEGContentGeneric;
32 struct _JPEGContentGeneric
38 typedef union _JPEGContent JPEGContent;
41 JPEGContentGeneric generic;
45 typedef struct _JPEGSection JPEGSection;
52 typedef struct _JPEGData JPEGData;
53 typedef struct _JPEGDataPrivate JPEGDataPrivate;
57 JPEGSection *sections;
63 JPEGDataPrivate *priv;
66 JPEGData *jpeg_data_new (void);
67 JPEGData *jpeg_data_new_from_file (const char *path);
68 JPEGData *jpeg_data_new_from_data (const unsigned char *data,
71 void jpeg_data_ref (JPEGData *data);
72 void jpeg_data_unref (JPEGData *data);
73 void jpeg_data_free (JPEGData *data);
75 void jpeg_data_load_data (JPEGData *data, const unsigned char *d,
77 void jpeg_data_save_data (JPEGData *data, unsigned char **d,
80 void jpeg_data_load_file (JPEGData *data, const char *path);
81 int jpeg_data_save_file (JPEGData *data, const char *path);
83 void jpeg_data_set_exif_data (JPEGData *data, ExifData *exif_data);
84 ExifData *jpeg_data_get_exif_data (JPEGData *data);
86 void jpeg_data_dump (JPEGData *data);
88 void jpeg_data_append_section (JPEGData *data);
90 void jpeg_data_log (JPEGData *data, ExifLog *log);
92 #endif /* __JPEG_DATA_H__ */