update to dcraw 7.30 and support even more cameras
from maintainer rohee@
This commit is contained in:
parent
e6f13370c0
commit
b35c2a5a66
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.2 2005/05/03 17:47:59 sturm Exp $
|
||||
# $OpenBSD: Makefile,v 1.3 2005/06/18 18:14:49 sturm Exp $
|
||||
|
||||
COMMENT= "digital camera RAW format conversion tool"
|
||||
|
||||
PKGNAME= dcraw-7.17
|
||||
PKGNAME= dcraw-7.30
|
||||
CATEGORIES= graphics
|
||||
|
||||
HOMEPAGE= http://www.cybercom.net/~dcoffin/dcraw/
|
||||
|
@ -1,8 +1,8 @@
|
||||
MD5 (dcraw-7.17/dcraw.1) = e45f5cc6e679348d5f0ae584747b08cf
|
||||
MD5 (dcraw-7.17/dcraw.c) = 422363df0b5c6cc04ed78bcd25c8dca6
|
||||
RMD160 (dcraw-7.17/dcraw.1) = 825ebbc2d3a6c08aeebf1554e1efcb6c54dfe678
|
||||
RMD160 (dcraw-7.17/dcraw.c) = 45fc25f0c04a7d7a51986e0d72c6507065fbe626
|
||||
SHA1 (dcraw-7.17/dcraw.1) = 2a2eece7112b617a8361bbee6f9bbf044414d3fe
|
||||
SHA1 (dcraw-7.17/dcraw.c) = d5de11e583e2fb35534125ff0004ddd160e70bec
|
||||
SIZE (dcraw-7.17/dcraw.1) = 3494
|
||||
SIZE (dcraw-7.17/dcraw.c) = 141292
|
||||
MD5 (dcraw-7.30/dcraw.1) = 820272f1b98125d473c62abe4a36cc79
|
||||
MD5 (dcraw-7.30/dcraw.c) = 77c020aaae5bc75008917999cc4ddcff
|
||||
RMD160 (dcraw-7.30/dcraw.1) = b0a0b0376c9fcbc1b996466e6c77bfffa07c25cb
|
||||
RMD160 (dcraw-7.30/dcraw.c) = 3c36b28c4da99eb6db2fa9046d3f7e29dcea36ca
|
||||
SHA1 (dcraw-7.30/dcraw.1) = 6c022b8aebc4a84b36fc59c497be54856b4ee543
|
||||
SHA1 (dcraw-7.30/dcraw.c) = 9a444ae352d82640938a0d88823e138d1b944ac1
|
||||
SIZE (dcraw-7.30/dcraw.1) = 3744
|
||||
SIZE (dcraw-7.30/dcraw.c) = 151490
|
||||
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-dcraw_c,v 1.2 2005/05/03 17:47:59 sturm Exp $
|
||||
$OpenBSD: patch-dcraw_c,v 1.3 2005/06/18 18:14:49 sturm Exp $
|
||||
|
||||
Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
|
||||
--- dcraw.c.orig Tue May 3 01:07:46 2005
|
||||
+++ dcraw.c Tue May 3 01:10:33 2005
|
||||
@@ -1825,7 +1825,7 @@ void CLASS foveon_interpolate()
|
||||
--- dcraw.c.orig Sat Jun 18 00:00:12 2005
|
||||
+++ dcraw.c Sat Jun 18 00:01:06 2005
|
||||
@@ -1958,7 +1958,7 @@ void CLASS foveon_interpolate()
|
||||
for (j=0; j < 3; j++)
|
||||
FORC3 last[i][j] += correct[i][c] * cam_xyz[c][j];
|
||||
|
||||
@ -13,7 +13,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
if (foveon_camf_param ("IncludeBlocks", str))
|
||||
foveon_fixed (div, 3, str);
|
||||
else {
|
||||
@@ -2190,9 +2190,9 @@ void CLASS bad_pixels()
|
||||
@@ -2323,9 +2323,9 @@ void CLASS bad_pixels()
|
||||
if (*cp == '\\') *cp = '/';
|
||||
#endif
|
||||
cp = fname + strlen(fname);
|
||||
@ -25,7 +25,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
if ((fp = fopen (fname, "r"))) break;
|
||||
if (cp == fname) break;
|
||||
while (*--cp != '/');
|
||||
@@ -2826,7 +2826,7 @@ int CLASS parse_tiff_ifd (int base, int
|
||||
@@ -3065,7 +3065,7 @@ int CLASS parse_tiff_ifd (int base, int
|
||||
if (level) {
|
||||
data_offset = ftell(ifp);
|
||||
} else {
|
||||
@ -34,7 +34,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
data_offset = get4();
|
||||
}
|
||||
break;
|
||||
@@ -2938,7 +2938,7 @@ guess_cfa_pc:
|
||||
@@ -3181,7 +3181,7 @@ guess_cfa_pc:
|
||||
raw_height++;
|
||||
|
||||
if (make[0] == 0 && raw_width == 680)
|
||||
@ -43,7 +43,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
|
||||
return done;
|
||||
}
|
||||
@@ -3000,6 +3000,7 @@ void CLASS parse_external_jpeg()
|
||||
@@ -3243,6 +3243,7 @@ void CLASS parse_external_jpeg()
|
||||
{
|
||||
char *file, *ext, *jname, *jfile, *jext;
|
||||
FILE *save=ifp;
|
||||
@ -51,7 +51,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
|
||||
ext = strrchr (ifname, '.');
|
||||
file = strrchr (ifname, '/');
|
||||
@@ -3007,13 +3008,15 @@ void CLASS parse_external_jpeg()
|
||||
@@ -3250,13 +3251,15 @@ void CLASS parse_external_jpeg()
|
||||
if (!file) file = ifname-1;
|
||||
file++;
|
||||
if (strlen(ext) != 4 || ext-file != 8) return;
|
||||
@ -70,7 +70,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
memcpy (jfile, file+4, 4);
|
||||
memcpy (jfile+4, file, 4);
|
||||
} else
|
||||
@@ -3215,8 +3218,8 @@ void CLASS parse_rollei()
|
||||
@@ -3459,8 +3462,8 @@ void CLASS parse_rollei()
|
||||
if ((ts = mktime(&t)) > 0)
|
||||
timestamp = ts;
|
||||
data_offset += tx * ty * 2;
|
||||
@ -81,25 +81,57 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
}
|
||||
|
||||
void CLASS parse_mos (int offset)
|
||||
@@ -3273,7 +3276,7 @@ void parse_phase_one (int base)
|
||||
nikon_curve_offset = ftell(ifp) - 4;
|
||||
@@ -3544,14 +3547,14 @@ void CLASS parse_phase_one (int base)
|
||||
}
|
||||
fseek (ifp, save, SEEK_SET);
|
||||
}
|
||||
- strcpy (make, "Phase One");
|
||||
+ strlcpy (make, "Phase One", sizeof make);
|
||||
if (model[0]) return;
|
||||
- sprintf (model, "%dx%d", width, height);
|
||||
+ snprintf (model, sizeof model, "%dx%d", width, height);
|
||||
switch (raw_height) {
|
||||
- case 2060: strcpy (model,"LightPhase"); break;
|
||||
- case 2682: strcpy (model,"H 10"); break;
|
||||
- case 4128: strcpy (model,"H 20"); break;
|
||||
- case 5488: strcpy (model,"H 25"); break;
|
||||
+ case 2060: strlcpy (model,"LightPhase", sizeof model); break;
|
||||
+ case 2682: strlcpy (model,"H 10", sizeof model); break;
|
||||
+ case 4128: strlcpy (model,"H 20", sizeof model); break;
|
||||
+ case 5488: strlcpy (model,"H 25", sizeof model); break;
|
||||
}
|
||||
}
|
||||
|
||||
void parse_fuji (int offset)
|
||||
@@ -3561,7 +3564,7 @@ void CLASS adobe_coeff()
|
||||
for (i=0; i < 4; i++)
|
||||
for (j=0; j < 4; j++)
|
||||
cc[i][j] = i == j;
|
||||
@@ -3590,7 +3593,7 @@ void CLASS parse_jpeg (int offset)
|
||||
parse_tiff (save+6);
|
||||
fseek (ifp, save+len, SEEK_SET);
|
||||
}
|
||||
- strcat (model," JPEG");
|
||||
+ strlcat (model," JPEG", sizeof model);
|
||||
}
|
||||
|
||||
void CLASS parse_smal (int offset, int fsize)
|
||||
@@ -3613,8 +3616,8 @@ void CLASS parse_smal (int offset, int f
|
||||
height = get2();
|
||||
width = get2();
|
||||
}
|
||||
- strcpy (make, "SMaL");
|
||||
- sprintf (model, "v%d %dx%d", ver, width, height);
|
||||
+ strlcpy (make, "SMaL", sizeof make);
|
||||
+ snprintf (model, sizeof model, "v%d %dx%d", ver, width, height);
|
||||
}
|
||||
|
||||
char * CLASS foveon_gets (int offset, char *str, int len)
|
||||
@@ -3886,7 +3889,7 @@ void CLASS adobe_coeff()
|
||||
char name[130];
|
||||
int i, j;
|
||||
|
||||
- sprintf (name, "%s %s", make, model);
|
||||
+ snprintf (name, sizeof name, "%s %s", make, model);
|
||||
for (i=0; i < sizeof table / sizeof *table; i++)
|
||||
if (!strncmp (name, table[i].prefix, strlen(table[i].prefix))) {
|
||||
for (j=0; j < 12; j++)
|
||||
@@ -3685,14 +3688,14 @@ int CLASS identify()
|
||||
@@ -4010,14 +4013,14 @@ int CLASS identify (int will_decode)
|
||||
order = 0x4949;
|
||||
fseek (ifp, 38, SEEK_SET);
|
||||
if (get4() == 2834 && get4() == 2834) {
|
||||
@ -117,7 +149,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
order = 0x4949;
|
||||
fseek (ifp, 10, SEEK_SET);
|
||||
data_offset += get4();
|
||||
@@ -3704,13 +3707,13 @@ nucore:
|
||||
@@ -4029,15 +4032,15 @@ nucore:
|
||||
data_offset -= 0x1000;
|
||||
}
|
||||
} else if (!memcmp (head+25, "ARECOYK", 7)) {
|
||||
@ -125,6 +157,8 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
- strcpy (model,"N Digital");
|
||||
+ strlcpy (make, "Contax", sizeof make);
|
||||
+ strlcpy (model,"N Digital", sizeof model);
|
||||
fseek (ifp, 33, SEEK_SET);
|
||||
get_timestamp(1);
|
||||
fseek (ifp, 60, SEEK_SET);
|
||||
FORC4 cam_mul[c ^ (c >> 1)] = get4();
|
||||
} else if (!strcmp (head, "PXN")) {
|
||||
@ -135,7 +169,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
} else if (!memcmp (head, "FUJIFILM", 8)) {
|
||||
fseek (ifp, 92, SEEK_SET);
|
||||
parse_fuji (get4());
|
||||
@@ -3726,8 +3729,8 @@ nucore:
|
||||
@@ -4055,8 +4058,8 @@ nucore:
|
||||
else
|
||||
for (i=0; i < sizeof table / sizeof *table; i++)
|
||||
if (fsize == table[i].fsize) {
|
||||
@ -146,7 +180,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
if (table[i].withjpeg)
|
||||
parse_external_jpeg();
|
||||
}
|
||||
@@ -3736,7 +3739,7 @@ nucore:
|
||||
@@ -4067,7 +4070,7 @@ nucore:
|
||||
|
||||
for (i=0; i < sizeof corp / sizeof *corp; i++)
|
||||
if (strstr (make, corp[i])) /* Simplify company names */
|
||||
@ -155,16 +189,16 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
if (!strncmp (make, "KODAK", 5))
|
||||
make[16] = model[16] = 0;
|
||||
cp = make + strlen(make); /* Remove trailing spaces */
|
||||
@@ -3767,7 +3770,7 @@ nucore:
|
||||
@@ -4098,7 +4101,7 @@ nucore:
|
||||
}
|
||||
load_raw = NULL;
|
||||
if (is_dng) {
|
||||
- strcat (model, " DNG");
|
||||
+ strlcat (model, " DNG", sizeof model);
|
||||
- strcat (model," DNG");
|
||||
+ strlcat (model," DNG", sizeof model);
|
||||
if (filters == UINT_MAX) filters = 0;
|
||||
if (!filters)
|
||||
colors = tiff_samples;
|
||||
if (tiff_data_compression == 1)
|
||||
@@ -3949,7 +3952,7 @@ canon_cr2:
|
||||
@@ -4281,7 +4284,7 @@ canon_cr2:
|
||||
pre_mul[2] = 1.018;
|
||||
} else if (!strcmp(model,"E995")) {
|
||||
cp_e995:
|
||||
@ -173,7 +207,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
height = 1540;
|
||||
width = 2064;
|
||||
colors = 4;
|
||||
@@ -3963,7 +3966,7 @@ cp_e995:
|
||||
@@ -4295,7 +4298,7 @@ cp_e995:
|
||||
pre_mul[2] = 1.040;
|
||||
} else if (!strcmp(model,"E2500")) {
|
||||
cp_e2500:
|
||||
@ -182,7 +216,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
height = 1204;
|
||||
width = 1616;
|
||||
colors = 4;
|
||||
@@ -3977,8 +3980,8 @@ cp_e2500:
|
||||
@@ -4309,8 +4312,8 @@ cp_e2500:
|
||||
pre_mul[2] = 1.618;
|
||||
} else if (!strcmp(model,"Optio 33WR")) {
|
||||
optio_33wr:
|
||||
@ -193,7 +227,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
height = 1542;
|
||||
width = 2064;
|
||||
load_raw = nikon_e2100_load_raw;
|
||||
@@ -3996,8 +3999,8 @@ optio_33wr:
|
||||
@@ -4328,8 +4331,8 @@ optio_33wr:
|
||||
pre_mul[2] = 322;
|
||||
} else if (!strcmp(model,"DiMAGE Z2")) {
|
||||
dimage_z2:
|
||||
@ -204,7 +238,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
height = 1710;
|
||||
width = 2288;
|
||||
filters = 0x16161616;
|
||||
@@ -4025,7 +4028,7 @@ dimage_z2:
|
||||
@@ -4355,7 +4358,7 @@ dimage_z2:
|
||||
filters = 0x61616161;
|
||||
load_raw = fuji_s2_load_raw;
|
||||
black = 128;
|
||||
@ -213,32 +247,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
} else if (!strcmp(model,"FinePix S3Pro")) {
|
||||
height = 3583;
|
||||
width = 3584;
|
||||
@@ -4168,20 +4171,20 @@ konica_400z:
|
||||
} else if (!strcmp(make,"Phase One")) {
|
||||
switch (raw_height) {
|
||||
case 2060:
|
||||
- strcpy (model, "LightPhase");
|
||||
+ strlcpy (model, "LightPhase", sizeof model);
|
||||
pre_mul[0] = 1.331;
|
||||
pre_mul[2] = 1.154;
|
||||
break;
|
||||
case 2682:
|
||||
- strcpy (model, "H10");
|
||||
+ strlcpy (model, "H10", sizeof model);
|
||||
break;
|
||||
case 4128:
|
||||
- strcpy (model, "H20");
|
||||
+ strlcpy (model, "H20", sizeof model);
|
||||
pre_mul[0] = 1.963;
|
||||
pre_mul[2] = 1.430;
|
||||
break;
|
||||
case 5488:
|
||||
- strcpy (model, "H25");
|
||||
+ strlcpy (model, "H25", sizeof model);
|
||||
pre_mul[0] = 2.80;
|
||||
pre_mul[2] = 1.20;
|
||||
}
|
||||
@@ -4199,7 +4202,7 @@ konica_400z:
|
||||
@@ -4516,7 +4519,7 @@ konica_400z:
|
||||
data_offset -= 10;
|
||||
flip = 3;
|
||||
}
|
||||
@ -247,14 +256,13 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
filters = 0x61616161;
|
||||
load_raw = unpacked_load_raw;
|
||||
maximum = 0xffff;
|
||||
@@ -4218,12 +4221,12 @@ konica_400z:
|
||||
filters = 0x16161616;
|
||||
@@ -4533,11 +4536,11 @@ konica_400z:
|
||||
} else if (!strcmp(make,"Leaf")) {
|
||||
load_raw = unpacked_load_raw;
|
||||
maximum = 0x3fff;
|
||||
- strcpy (model, "Valeo");
|
||||
+ strlcpy (model, "Valeo", sizeof model);
|
||||
if (raw_width == 2060) {
|
||||
filters = 0;
|
||||
if (filters == 0) {
|
||||
load_raw = leaf_load_raw;
|
||||
maximum = 0xffff;
|
||||
- strcpy (model, "Volare");
|
||||
@ -262,7 +270,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
}
|
||||
} else if (!strcmp(model,"DIGILUX 2") || !strcmp(model,"DMC-LC1")) {
|
||||
height = 1928;
|
||||
@@ -4348,7 +4351,7 @@ konica_400z:
|
||||
@@ -4662,7 +4665,7 @@ konica_400z:
|
||||
return 1;
|
||||
}
|
||||
if (strstr(model,"DC25")) {
|
||||
@ -271,7 +279,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
data_offset = 15424;
|
||||
}
|
||||
if (!strncmp(model,"DC2",3)) {
|
||||
@@ -4367,19 +4370,19 @@ konica_400z:
|
||||
@@ -4681,19 +4684,19 @@ konica_400z:
|
||||
pre_mul[3] = 1.036;
|
||||
load_raw = kodak_easy_load_raw;
|
||||
} else if (!strcmp(model,"Digital Camera 40")) {
|
||||
@ -294,15 +302,15 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
height = 976;
|
||||
width = 848;
|
||||
if (tiff_data_compression == 7)
|
||||
@@ -4794,6 +4797,7 @@ int CLASS main (int argc, char **argv)
|
||||
char opt, *ofname, *cp;
|
||||
@@ -5112,6 +5115,7 @@ int CLASS main (int argc, char **argv)
|
||||
struct utimbuf ut;
|
||||
const char *write_ext = ".ppm";
|
||||
FILE *ofp = stdout;
|
||||
+ size_t ofsize;
|
||||
#ifdef USE_LCMS
|
||||
char *profile = NULL;
|
||||
#endif
|
||||
@@ -4961,14 +4965,15 @@ int CLASS main (int argc, char **argv)
|
||||
@@ -5294,14 +5298,15 @@ next:
|
||||
flip_image();
|
||||
}
|
||||
fclose(ifp);
|
||||
|
Loading…
Reference in New Issue
Block a user