6 * Original version 2005 Lars Ellenberg, base on dcraw by David coffin.
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!
13 #ifndef __FORMAT_RAW_H
14 #define __FORMAT_RAW_H
21 FORMAT_RAW_MATCH_MAGIC,
22 FORMAT_RAW_MATCH_TIFF_MAKE
29 FORMAT_RAW_EXIF_IFD_II,
30 FORMAT_RAW_EXIF_IFD_MM,
31 FORMAT_RAW_EXIF_PROPRIETARY
34 typedef gint (* FormatRawParseFunc)(unsigned char *data, const guint len,
35 guint *image_offset, guint *exif_offset);
37 typedef gint (* FormatRawExifParseFunc)(unsigned char *data, const guint len,
40 gint format_raw_img_exif_offsets(unsigned char *data, const guint len,
41 guint *image_offset, guint *exif_offset);
42 gint format_raw_img_exif_offsets_fd(int fd, const gchar *path,
43 unsigned char *header_data, const guint header_len,
44 guint *image_offset, guint *exif_offset);
46 FormatRawExifType format_raw_exif_offset(unsigned char *data, const guint len, guint *exif_offset,
47 FormatRawExifParseFunc *exif_parse_func);
51 FORMAT_EXIF_MATCH_MAKE,
52 FORMAT_EXIF_MATCH_MAKERNOTE
53 } FormatExifMatchType;
55 typedef gint (* FormatExifParseFunc)(ExifData *exif, unsigned char *tiff, guint offset,
56 guint size, ExifByteOrder bo);
58 gint format_exif_makernote_parse(ExifData *exif, unsigned char *tiff, guint offset,
59 guint size, ExifByteOrder bo);
62 #define DEBUG_RAW_TIFF 0
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 }, \
71 FORMAT_RAW_MATCH_MAGIC, 0, "MM", 2, \
72 FORMAT_RAW_EXIF_NONE, NULL, \
73 "Tiff debugger MM", format_debug_tiff_raw }
75 /* used for debugging only */
76 gint format_debug_tiff_raw(unsigned char *data, const guint len,
77 guint *image_offset, guint *exif_offset);