Tue Nov 7 15:35:59 2006 John Ellis <johne@verizon.net>
[geeqie.git] / src / format_nikon.h
1 /*
2  *  GQView
3  *  (C) 2005 John Ellis
4  *
5  * This software is released under the GNU General Public License (GNU GPL).
6  * Please read the included file COPYING for more information.
7  * This software comes with no warranty of any kind, use at your own risk!
8  */
9
10 #ifndef __FORMAT_NIKON_H
11 #define __FORMAT_NIKON_H
12
13
14 #include "exif.h"
15
16 gint format_nikon_raw(unsigned char *data, const guint len,
17                       guint *image_offset, guint *exif_offset);
18
19 #define FORMAT_RAW_NIKON { "nef", \
20                            FORMAT_RAW_MATCH_TIFF_MAKE, 0, "NIKON CORPORATION", 17, \
21                            FORMAT_RAW_EXIF_TIFF, NULL, \
22                            "Nikon raw", format_nikon_raw }
23
24 /* If your format is basically just TIFF with an embedded jpeg,
25  * then avoid duplicating code and just stick it here and use the existing nikon parse.
26  */
27 #define FORMAT_RAW_PENTAX { "pef", \
28                             FORMAT_RAW_MATCH_MAGIC, 242, "PENTAX Corporation", 18, \
29                             FORMAT_RAW_EXIF_TIFF, NULL, \
30                             "Pentax raw", format_nikon_raw }
31
32
33 gint format_nikon_makernote(ExifData *exif, unsigned char *tiff, guint offset,
34                             guint size, ExifByteOrder bo);
35
36 #define FORMAT_EXIF_NIKON { FORMAT_EXIF_MATCH_MAKERNOTE, "Nikon\x00", 6, "Nikon", format_nikon_makernote }, \
37                           { FORMAT_EXIF_MATCH_MAKE,      "NIKON",     5, "Nikon", format_nikon_makernote }
38
39
40 #endif
41