Fixed crash on faulty JPGs by GreatBull69; see issue #362

This commit is contained in:
Oliver Duis
2010-12-03 11:06:29 +01:00
commit f52810e56b
659 changed files with 140680 additions and 0 deletions

49
winclude/common.h Executable file
View File

@@ -0,0 +1,49 @@
#ifndef _COMMON_
#define _COMMON_
#define ISRED(image,row,col) \
((image->filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)==0)
#define ISGREEN(image,row,col) \
((image->filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)==1)
#define ISBLUE(image,row,col) \
((image->filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)==2)
#define CMAXVAL 65535
#include <time.h>
struct RawImage {
int width;
int height;
unsigned filters;
double red_multiplier;
double green_multiplier;
double blue_multiplier;
double camwb_red;
double camwb_green;
double camwb_blue;
int blackpoint;
int rgb_max;
int rotate_deg;
int fuji_width;
struct tm* time;
float iso_speed, aperture, focal_len, shutter;
char *make, *model;
int exifbase, exiflocation, exiforder;
unsigned short** data; // holds pixel values, data[i][j] corresponds to the ith row and jth column
float coeff[3][4];
float icoeff[3][4];
};
#endif