Remove commented out code.
[geeqie.git] / src / format_raw.h
1 /*
2  * Geeqie
3  * (C) 2005 John Ellis
4  * Copyright (C) 2008 - 2012 The Geeqie Team
5  *
6  *  Authors:
7  *    Original version 2005 Lars Ellenberg, base on dcraw by David coffin.
8  *
9  * This software is released under the GNU General Public License (GNU GPL).
10  * Please read the included file COPYING for more information.
11  * This software comes with no warranty of any kind, use at your own risk!
12  */
13
14 #ifndef __FORMAT_RAW_H
15 #define __FORMAT_RAW_H
16
17 #include "exif-int.h"
18
19
20 typedef enum {
21         FORMAT_RAW_MATCH_MAGIC,
22         FORMAT_RAW_MATCH_TIFF_MAKE
23 } FormatRawMatchType;
24
25 typedef enum {
26         FORMAT_RAW_EXIF_NONE,
27         FORMAT_RAW_EXIF_TIFF,
28         FORMAT_RAW_EXIF_JPEG,
29         FORMAT_RAW_EXIF_IFD_II,
30         FORMAT_RAW_EXIF_IFD_MM,
31         FORMAT_RAW_EXIF_PROPRIETARY
32 } FormatRawExifType;
33
34 typedef gboolean (* FormatRawParseFunc)(guchar *data, const guint len,
35                                         guint *image_offset, guint *exif_offset);
36
37 typedef gboolean (* FormatRawExifParseFunc)(guchar *data, const guint len,
38                                             ExifData *exif);
39
40 gboolean format_raw_img_exif_offsets(guchar *data, const guint len,
41                                      guint *image_offset, guint *exif_offset);
42 gboolean format_raw_img_exif_offsets_fd(gint fd, const gchar *path,
43                                         guchar *header_data, const guint header_len,
44                                         guint *image_offset, guint *exif_offset);
45
46 FormatRawExifType format_raw_exif_offset(guchar *data, const guint len, guint *exif_offset,
47                                          FormatRawExifParseFunc *exif_parse_func);
48
49
50 typedef enum {
51         FORMAT_EXIF_MATCH_MAKE,
52         FORMAT_EXIF_MATCH_MAKERNOTE
53 } FormatExifMatchType;
54
55 typedef gint (* FormatExifParseFunc)(ExifData *exif, guchar *tiff, guint offset,
56                                      guint size, ExifByteOrder bo);
57
58 gboolean format_exif_makernote_parse(ExifData *exif, guchar *tiff, guint offset,
59                                      guint size, ExifByteOrder bo);
60
61
62 #define DEBUG_RAW_TIFF 0
63
64 #if DEBUG_RAW_TIFF
65
66 #define FORMAT_RAW_DEBUG_TIFF { "", \
67                                 FORMAT_RAW_MATCH_MAGIC,     0, "II", 2, \
68                                 FORMAT_RAW_EXIF_NONE, NULL, \
69                                 "Tiff debugger II", format_debug_tiff_raw }, \
70                               { "", \
71                                 FORMAT_RAW_MATCH_MAGIC,     0, "MM", 2, \
72                                 FORMAT_RAW_EXIF_NONE, NULL, \
73                                 "Tiff debugger MM", format_debug_tiff_raw }
74
75 /* used for debugging only */
76 gint format_debug_tiff_raw(guchar *data, const guint len,
77                            guint *image_offset, guint *exif_offset);
78 #endif
79
80 #endif
81 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */