From 2b6789b4ac89a5897e79cc49097e24ba8f9b1bd6 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Thu, 11 Jan 2024 22:32:09 -0800 Subject: [PATCH] Fix Hasselblad model name when using LibRaw The model, rather than the normalized model, gives the name that matches those given by dcraw for Hasselblad cameras. This is important for matching the model name in camconst.json. --- rtengine/rawimage.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index 51ef67630..704db176f 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -548,6 +548,12 @@ int RawImage::loadRaw(bool loadData, unsigned int imageNum, bool closeFile, Prog colors = d.colors; tiff_bps = 0; + if (!strcmp("Hasselblad", make)) { + // For Hasselblad, "model" provides the better name. + strncpy(model, d.model, sizeof(model) - 1); + model[sizeof(model) - 1] = 0; + } + if (merged_pixelshift.is_merged_pixelshift || (strncmp(libraw->unpack_function_name(), "sony_arq_load_raw", 17) == 0 && is_raw == 1 && colors == 4)) {