| 1 | /* Copyright 2012 Bert Muennich |
| 2 | * |
| 3 | * This file is part of sxiv. |
| 4 | * |
| 5 | * sxiv is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published |
| 7 | * by the Free Software Foundation; either version 2 of the License, |
| 8 | * or (at your option) any later version. |
| 9 | * |
| 10 | * sxiv is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with sxiv. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #ifndef EXIF_H |
| 20 | #define EXIF_H |
| 21 | |
| 22 | #include "types.h" |
| 23 | |
| 24 | enum { |
| 25 | JPEG_MARKER_SOI = 0xFFD8, |
| 26 | JPEG_MARKER_APP0 = 0xFFE0, |
| 27 | JPEG_MARKER_APP1 = 0xFFE1 |
| 28 | }; |
| 29 | |
| 30 | enum { |
| 31 | EXIF_MAX_LEN = 0x10000, |
| 32 | EXIF_HEAD = 0x45786966, |
| 33 | EXIF_BO_BIG_ENDIAN = 0x4D4D, |
| 34 | EXIF_BO_LITTLE_ENDIAN = 0x4949, |
| 35 | EXIF_TAG_MARK = 0x002A, |
| 36 | EXIF_TAG_ORIENTATION = 0x0112 |
| 37 | }; |
| 38 | |
| 39 | int exif_orientation(const fileinfo_t*); |
| 40 | void exif_auto_orientate(const fileinfo_t*); /* in image.c */ |
| 41 | |
| 42 | #endif /* EXIF_H */ |