资源简介
dcraw 1.477
代码片段和文件信息
/*
dcraw.c -- Dave Coffin‘s raw photo decoder
Copyright 1997-2016 by Dave Coffin dcoffin a cybercom o net
This is a command-line ANSI C program to convert raw photos from
any digital camera on any computer running any operating system.
No license is required to download and use dcraw.c. However
to lawfully redistribute dcraw you must either (a) offer at
no extra charge full source code* for all executable files
containing RESTRICTED functions (b) distribute this code under
the GPL Version 2 or later (c) remove all RESTRICTED functions
re-implement them or copy them from an earlier unrestricted
Revision of dcraw.c or (d) purchase a license from the author.
The functions that process Foveon images have been RESTRICTED
since Revision 1.237. All other code remains free for all uses.
*If you have not modified dcraw.c in any way a link to my
homepage qualifies as “full source code“.
$Revision: 1.477 $
$Date: 2016/05/10 21:30:43 $
*/
#define DCRAW_VERSION “9.27“
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#define _USE_MATH_DEFINES
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#if defined(DJGPP) || defined(__MINGW32__)
#define fseeko fseek
#define ftello ftell
#else
#define fgetc getc_unlocked
#endif
#ifdef __CYGWIN__
#include
#endif
#ifdef WIN32
#include
#include
#pragma comment(lib “ws2_32.lib“)
#define snprintf _snprintf
#define strcasecmp stricmp
#define strncasecmp strnicmp
typedef __int64 INT64;
typedef unsigned __int64 UINT64;
#else
#include
#include
#include
typedef long long INT64;
typedef unsigned long long UINT64;
#endif
#ifdef NODEPS
#define NO_JASPER
#define NO_JPEG
#define NO_LCMS
#endif
#ifndef NO_JASPER
#include /* Decode Red camera movies */
#endif
#ifndef NO_JPEG
#include /* Decode compressed Kodak DC120 photos */
#endif /* and Adobe Lossy DNGs */
#ifndef NO_LCMS
#include /* Support color profiles */
#endif
#ifdef LOCALEDIR
#include
#define _(String) gettext(String)
#else
#define _(String) (String)
#endif
#if !defined(uchar)
#define uchar unsigned char
#endif
#if !defined(ushort)
#define ushort unsigned short
#endif
/*
All global variables are defined here and all functions that
access them are prefixed with “CLASS“. Note that a thread-safe
C++ class cannot have non-const static local variables.
*/
FILE *ifp *ofp;
short order;
const char *ifname;
char *meta_data xtrans[6][6] xtrans_abs[6][6];
char cdesc[5] desc[512] make[64] model[64] model2[64] artist[64];
float flash_used canon_ev iso_speed shutter aperture focal_len;
time_t timestamp;
off_t strip_offset data_offset;
off_t thumb_offset meta_offset profile_offset;
unsig
评论
共有 条评论