view src/format_raw.h @ 54:b58cac75ad12

Thu Jun 9 22:23:18 2005 John Ellis <johne@verizon.net> * exif.[ch]: A lot of code clean up, add generic tiff header parser, remove use of packed structures to interpret tiff file format, fix possible endless loops in tiff parser with corrupt IFD tables, and fix possible overflow in jpeg exif parser. * format_canon.[ch]: Add additional makernote values, plus a few spelling fixes. Header update. * format_fuji.[ch]: Header update. * format_nikon.[ch]: Updates to use new tiff parsing utils in exif.c, code cleanup. Header update. * format_raw.[ch]: Add pathname argument to file descriptor version of raw parser to quickly rule out non-raw files based on file extension. Add raw header match type to check for tiff "make" field value. * image-load.c (image_loader_begin): Add image filename for raw parser.
author gqview
date Fri, 10 Jun 2005 02:44:36 +0000
parents 276ea4c98d33
children 847e4bc6b54c
line wrap: on
line source

/*
 *  GQView
 *  (C) 2005 John Ellis
 *
 *  Authors:
 *    Original version 2005 Lars Ellenberg, base on dcraw by David coffin.
 *
 * This software is released under the GNU General Public License (GNU GPL).
 * Please read the included file COPYING for more information.
 * This software comes with no warranty of any kind, use at your own risk!
 */

#ifndef __FORMAT_RAW_H
#define __FORMAT_RAW_H


#include "exif.h"


typedef enum {
	FORMAT_RAW_MATCH_MAGIC,
	FORMAT_RAW_MATCH_TIFF_MAKE
} FormatRawMatchType;

typedef gint (* FormatRawParseFunc)(unsigned char *data, const guint len,
				    guint *image_offset, guint *exif_offset);

gint format_raw_img_exif_offsets(unsigned char *data, const guint len,
				 guint *image_offset, guint *exif_offset);
gint format_raw_img_exif_offsets_fd(int fd, const gchar *path,
				    unsigned char *header_data, const guint header_len,
				    guint *image_offset, guint *exif_offset);


typedef enum {
	FORMAT_EXIF_MATCH_MAKE,
	FORMAT_EXIF_MATCH_MAKERNOTE
} FormatExifMatchType;

typedef gint (* FormatExifParseFunc)(ExifData *exif, unsigned char *tiff, guint offset,
				    guint size, ExifByteOrder bo);

gint format_exif_makernote_parse(ExifData *exif, unsigned char *tiff, guint offset,
				 guint size, ExifByteOrder bo);


#endif