--- dcraw.c.orig 2007-08-10 17:09:34.000000000 -0400 +++ dcraw.c 2007-09-07 16:20:35.000000000 -0400 @@ -6091,7 +6091,11 @@ /* index 3 -- Nikon E880, E900, and E990 */ { -1.936280, 1.800443, -1.448486, 2.584324, 1.405365, -0.524955, -0.289090, 0.408680, - -1.204965, 1.082304, 2.941367, -1.818705 } + -1.204965, 1.082304, 2.941367, -1.818705 }, + /* index 4 - GSI Terrapix A */ + { 0.90843134, 0.34143497, -0.52247801, + -0.42400533, 1.60575446, -0.18705347, + -0.50791597, -0.71435708, 3.23840753 }, }; int i, c; @@ -6184,7 +6188,8 @@ { 10702848, "PENTAX", "Optio 750Z" ,1 }, { 12582980, "Sinar", "" ,0 }, { 33292868, "Sinar", "" ,0 }, - { 44390468, "Sinar", "" ,0 } }; + { 44390468, "Sinar", "" ,0 }, + { 33554432, "GSI", "Terrapix" ,0 } }; static const char *corp[] = { "Canon", "NIKON", "EPSON", "KODAK", "Kodak", "OLYMPUS", "PENTAX", "MINOLTA", "Minolta", "Konica", "CASIO", "Sinar", "Phase One", @@ -7193,6 +7198,31 @@ load_raw = &CLASS packed_12_load_raw; pre_mul[0] = 1.758; pre_mul[2] = 1.504; + } else if (!strcmp(model,"Terrapix")) { + /* The camera back in the Terrapix that RIT flies has, according + * to GSI, bogus data in its leftmost 15 pixels. So, we'll reduce + * the actual size of the computed image, and use a different + * Bayer pattern definition to reflect the offset. Here, + * commented out, is what an "idealized" (flawless) Terrapix would + * use, and this is what you should start with if you're porting + * this to another Terrapix camera back. + raw_height = height = 4096; + raw_width = width = 4096; + top_margin = left_margin = 0; + filters = 0x61616161; + order = 0x4949; + load_raw = &CLASS unpacked_load_raw; + */ + raw_height = 4096; + raw_width = 4096; + top_margin = 0; + left_margin = 15; + height = raw_height - top_margin; + width = raw_width - left_margin; + filters = 0x94949494; + order = 0x4949; + simple_coeff(4); + load_raw = &CLASS unpacked_load_raw; } if (!model[0]) sprintf (model, "%dx%d", width, height);