Mercurial > geeqie.yaz
annotate src/format_nikon.h @ 276:4f526d436873
Implement secure rc file saving.
First data is written to a temporary file, then if nothing
was wrong, this file is renamed to the final name.
This way the risk of corrupted rc file is greatly reduced.
The code is borrowed from ELinks (http://elinks.cz).
author | zas_ |
---|---|
date | Tue, 08 Apr 2008 21:55:58 +0000 |
parents | 695e1ad3b169 |
children | 9de0f88b2b91 |
rev | line source |
---|---|
51 | 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 | |
176
695e1ad3b169
simplified exif.h, moved implementation-specific stuff to exif-int.h
nadvornik
parents:
103
diff
changeset
|
14 #include "exif-int.h" |
51 | 15 |
54
b58cac75ad12
Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents:
53
diff
changeset
|
16 gint format_nikon_raw(unsigned char *data, const guint len, |
53
00843150f7c8
Tue Jun 7 03:47:03 2005 John Ellis <johne@verizon.net>
gqview
parents:
51
diff
changeset
|
17 guint *image_offset, guint *exif_offset); |
00843150f7c8
Tue Jun 7 03:47:03 2005 John Ellis <johne@verizon.net>
gqview
parents:
51
diff
changeset
|
18 |
54
b58cac75ad12
Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents:
53
diff
changeset
|
19 #define FORMAT_RAW_NIKON { "nef", \ |
b58cac75ad12
Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents:
53
diff
changeset
|
20 FORMAT_RAW_MATCH_TIFF_MAKE, 0, "NIKON CORPORATION", 17, \ |
101
847e4bc6b54c
Tue Nov 7 15:35:59 2006 John Ellis <johne@verizon.net>
gqview
parents:
54
diff
changeset
|
21 FORMAT_RAW_EXIF_TIFF, NULL, \ |
54
b58cac75ad12
Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents:
53
diff
changeset
|
22 "Nikon raw", format_nikon_raw } |
53
00843150f7c8
Tue Jun 7 03:47:03 2005 John Ellis <johne@verizon.net>
gqview
parents:
51
diff
changeset
|
23 |
101
847e4bc6b54c
Tue Nov 7 15:35:59 2006 John Ellis <johne@verizon.net>
gqview
parents:
54
diff
changeset
|
24 /* If your format is basically just TIFF with an embedded jpeg, |
847e4bc6b54c
Tue Nov 7 15:35:59 2006 John Ellis <johne@verizon.net>
gqview
parents:
54
diff
changeset
|
25 * then avoid duplicating code and just stick it here and use the existing nikon parse. |
847e4bc6b54c
Tue Nov 7 15:35:59 2006 John Ellis <johne@verizon.net>
gqview
parents:
54
diff
changeset
|
26 */ |
847e4bc6b54c
Tue Nov 7 15:35:59 2006 John Ellis <johne@verizon.net>
gqview
parents:
54
diff
changeset
|
27 #define FORMAT_RAW_PENTAX { "pef", \ |
103
61e57ef42cf8
Wed Nov 8 11:36:58 2006 John Ellis <johne@verizon.net>
gqview
parents:
101
diff
changeset
|
28 FORMAT_RAW_MATCH_TIFF_MAKE, 0, "PENTAX Corporation", 18, \ |
101
847e4bc6b54c
Tue Nov 7 15:35:59 2006 John Ellis <johne@verizon.net>
gqview
parents:
54
diff
changeset
|
29 FORMAT_RAW_EXIF_TIFF, NULL, \ |
847e4bc6b54c
Tue Nov 7 15:35:59 2006 John Ellis <johne@verizon.net>
gqview
parents:
54
diff
changeset
|
30 "Pentax raw", format_nikon_raw } |
847e4bc6b54c
Tue Nov 7 15:35:59 2006 John Ellis <johne@verizon.net>
gqview
parents:
54
diff
changeset
|
31 |
51 | 32 |
33 gint format_nikon_makernote(ExifData *exif, unsigned char *tiff, guint offset, | |
54
b58cac75ad12
Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net>
gqview
parents:
53
diff
changeset
|
34 guint size, ExifByteOrder bo); |
51 | 35 |
53
00843150f7c8
Tue Jun 7 03:47:03 2005 John Ellis <johne@verizon.net>
gqview
parents:
51
diff
changeset
|
36 #define FORMAT_EXIF_NIKON { FORMAT_EXIF_MATCH_MAKERNOTE, "Nikon\x00", 6, "Nikon", format_nikon_makernote }, \ |
00843150f7c8
Tue Jun 7 03:47:03 2005 John Ellis <johne@verizon.net>
gqview
parents:
51
diff
changeset
|
37 { FORMAT_EXIF_MATCH_MAKE, "NIKON", 5, "Nikon", format_nikon_makernote } |
51 | 38 |
39 | |
40 #endif | |
41 |