[Digikam-devel] extragear/graphics/digikam
Gilles Caulier
caulier.gilles at free.fr
Tue Nov 7 12:11:17 GMT 2006
SVN commit 602964 by cgilles:
digikam from trunk : updated dcraw.c implementation to version 8.41
CCMAIL: digikam-devel at kde.org
M +1 -0 NEWS
M +22 -23 libs/dcraw/dcraw.c
--- trunk/extragear/graphics/digikam/NEWS #602963:602964
@@ -107,6 +107,7 @@
*** 0.9.0-rc **********************************************************
+General : dcraw implementation updated to version 8.41.
General : New kipi plugin to edit EXIF and IPTC metadata (available with next kipi-plugins 0.1.3).
...
--- trunk/extragear/graphics/digikam/libs/dcraw/dcraw.c #602963:602964
@@ -19,11 +19,11 @@
copy them from an earlier, non-GPL Revision of dcraw.c, or (c)
purchase a license from the author.
- $Revision: 1.353 $
- $Date: 2006/10/10 04:46:02 $
+ $Revision: 1.354 $
+ $Date: 2006/10/25 22:35:03 $
*/
-#define VERSION "8.40"
+#define VERSION "8.41"
#define _GNU_SOURCE
#define _USE_MATH_DEFINES
@@ -1072,27 +1072,25 @@
void CLASS nikon_3700()
{
- int i, sum[] = { 0, 0 };
- uchar tail[952];
+ int bits, i;
+ uchar dp[24];
+ static const struct {
+ int bits;
+ char make[12], model[15];
+ } table[] = {
+ { 0x00, "PENTAX", "Optio 33WR" },
+ { 0x03, "NIKON", "E3200" },
+ { 0x32, "NIKON", "E3700" },
+ { 0x33, "OLYMPUS", "C740UZ" } };
- fseek (ifp, -sizeof tail, SEEK_END);
- fread (tail, 1, sizeof tail, ifp);
- for (i=0; i < sizeof tail; i++)
- sum[(i>>2) & 1] += tail[i];
- if (sum[0] > 4*sum[1]) return;
- if (sum[1] > 4*sum[0]) {
- strcpy (make, "OLYMPUS");
- strcpy (model, "C740UZ");
- return;
- }
- sum[0] = sum[1] = 0;
- for (i=0; i < sizeof tail; i++)
- sum[i & 1] += tail[i];
- if (sum[1] > 4*sum[0] || sum[0]+sum[1] > 216000) {
- strcpy (make, "PENTAX");
- strcpy (model,"Optio 33WR");
- } else
- strcpy (model, "E3200");
+ fseek (ifp, 3072, SEEK_SET);
+ fread (dp, 1, 24, ifp);
+ bits = (dp[8] & 3) << 4 | (dp[20] & 3);
+ for (i=0; i < sizeof table / sizeof *table; i++)
+ if (bits == table[i].bits) {
+ strcpy (make, table[i].make );
+ strcpy (model, table[i].model);
+ }
}
/*
@@ -4239,6 +4237,7 @@
if (!strncmp(software,"Adobe",5) ||
!strncmp(software,"dcraw",5) ||
!strncmp(software,"Bibble",6) ||
+ !strncmp(software,"Nikon Scan",10) ||
!strcmp (software,"Digital Photo Professional"))
is_raw = 0;
break;
More information about the Digikam-devel
mailing list