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.
This commit is contained in:
Lawrence Lee 2024-01-11 22:32:09 -08:00
parent d13badbbe0
commit 2b6789b4ac
No known key found for this signature in database
GPG Key ID: 048FF2B76A63895F

View File

@ -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)) {