diff --git a/rtdata/dcpprofiles/SONY ILCE-6000.dcp b/rtdata/dcpprofiles/Sony ILCE-6000.dcp similarity index 100% rename from rtdata/dcpprofiles/SONY ILCE-6000.dcp rename to rtdata/dcpprofiles/Sony ILCE-6000.dcp diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 7ddcefaba..5d0898ee9 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1784,7 +1784,7 @@ Camera constants: "make_model": [ "RICOH PENTAX K-1", "PENTAX K-1" ], "dcraw_matrix": [ 8596,-2981,-639,-4202,12046,2431,-685,1424,6122 ], // adobe DNG v9.7 D65 //"dcraw_matrix": [ 8566,-2746,-1201,-3612,12204,1550,-893,1680,6264 ], // PENTAX DNG - "raw_crop": [ 6, 18, 7376, 4932 ], // full frame 7392x4950, cropped to official DNG raw_crop 6,18,7382,4950, official jpeg crop 8,10,7360x4912 + //"raw_crop": [ 6, 18, 7376, 4932 ], // full frame 7392x4950, cropped to official DNG raw_crop 6,18,7382,4950, official jpeg crop 8,10,7360x4912 "ranges": { "white": [ { "iso": [ 100, 200, 400, 800 ], "levels": 16300 }, // 16380 diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 4daf451d0..4a5e7f1c8 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -8743,6 +8743,10 @@ void CLASS identify() if (width == 7424 && !strcmp(model,"645D")) { height = 5502; width = 7328; filters = 0x61616161; top_margin = 29; left_margin = 48; } + if (width == 7392 && !strncmp(model,"K-1",3)) + { left_margin = 6; width = 7376; if(!dng_version) {top_margin = 18; height -= top_margin; }} + if (width == 4832 && !strncmp(model,"K-1",3)) // K-1 APS-C format + if(!dng_version) {top_margin = 18; height -= top_margin; } if (height == 3014 && width == 4096) /* Ricoh GX200 */ width = 4014; if (dng_version) { diff --git a/rtexif/stdattribs.cc b/rtexif/stdattribs.cc index 38e7f4b25..ed8f97819 100644 --- a/rtexif/stdattribs.cc +++ b/rtexif/stdattribs.cc @@ -447,12 +447,12 @@ public: { int count = t->getCount(); if(count <= 8) { - return ""; + return std::string(); } - + count = std::min(count, 65535); // limit to 65535 chars to avoid crashes in case of corrupted metadata char *buffer = new char[count - 7]; - if (!strncmp((char*)t->getValue(), "ASCII\0\0\0", 8)) { // TODO: this compares only up to the first \0, remaining \0\0 are ignored + if (!memcmp((char*)t->getValue(), "ASCII\0\0\0", 8)) { strncpy (buffer, (char*)t->getValue() + 8, count - 8); buffer[count - 8] = '\0'; } else {