diff options
-rw-r--r-- | src/olympus.rs | 3 | ||||
-rw-r--r-- | src/rawimage.rs | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/olympus.rs b/src/olympus.rs index 2d3447c..f97a5d5 100644 --- a/src/olympus.rs +++ b/src/olympus.rs @@ -2,7 +2,7 @@ /* * libopenraw - olympus.rs * - * Copyright (C) 2022-2023 Hubert Figuière + * Copyright (C) 2022-2024 Hubert Figuière * * This library is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -402,6 +402,7 @@ impl RawFileImpl for OrfFile { } _ => data, }; + data.set_photometric_interpretation(exif::PhotometricInterpretation::CFA); data.set_bpc(12); data.set_active_area(Some(Rect { x: 0, diff --git a/src/rawimage.rs b/src/rawimage.rs index cf032e6..e1661d8 100644 --- a/src/rawimage.rs +++ b/src/rawimage.rs @@ -2,7 +2,7 @@ /* * libopenraw - rawimage.rs * - * Copyright (C) 2022-2023 Hubert Figuière + * Copyright (C) 2022-2024 Hubert Figuière * * This library is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -377,7 +377,10 @@ impl RawImage { match self.photom_int { exif::PhotometricInterpretation::CFA => render::demosaic::bimedian(&buffer, pattern), exif::PhotometricInterpretation::LinearRaw => render::grayscale::to_rgb(&buffer), - _ => Err(Error::InvalidFormat), + _ => { + log::error!("Invalid photometric interpretation {:?}", self.photom_int); + Err(Error::InvalidFormat) + } } } |