8531e0143dff2f57081c243bf0b8cf02a8265dfa
[geeqie.git] / src / format_raw.h
1 /*
2  *  GQView
3  *  (C) 2005 John Ellis
4  *
5  *  Authors:
6  *    Original version 2005 Lars Ellenberg, base on dcraw by David coffin.
7  *
8  * This software is released under the GNU General Public License (GNU GPL).
9  * Please read the included file COPYING for more information.
10  * This software comes with no warranty of any kind, use at your own risk!
11  */
12
13 #ifndef __FORMAT_RAW_H
14 #define __FORMAT_RAW_H
15
16
17 #include "exif.h"
18
19
20 typedef enum {
21         FORMAT_RAW_MATCH_MAGIC,
22         FORMAT_RAW_MATCH_TIFF_MAKE
23 } FormatRawMatchType;
24
25 typedef gint (* FormatRawParseFunc)(unsigned char *data, const guint len,
26                                     guint *image_offset, guint *exif_offset);
27
28 gint format_raw_img_exif_offsets(unsigned char *data, const guint len,
29                                  guint *image_offset, guint *exif_offset);
30 gint format_raw_img_exif_offsets_fd(int fd, const gchar *path,
31                                     unsigned char *header_data, const guint header_len,
32                                     guint *image_offset, guint *exif_offset);
33
34
35 typedef enum {
36         FORMAT_EXIF_MATCH_MAKE,
37         FORMAT_EXIF_MATCH_MAKERNOTE
38 } FormatExifMatchType;
39
40 typedef gint (* FormatExifParseFunc)(ExifData *exif, unsigned char *tiff, guint offset,
41                                     guint size, ExifByteOrder bo);
42
43 gint format_exif_makernote_parse(ExifData *exif, unsigned char *tiff, guint offset,
44                                  guint size, ExifByteOrder bo);
45
46
47 #endif
48