Change EXIF Applicability's None to passthrough
This allows it to address the case of copying all EXIF data into a separate file. And as soon as our decoder can handle files without any image data (missing any stripoffsets, etc.) in ways that do not return errors we can hopefully do the opposite and merge the data again.
This commit is contained in:
1 parent
f057b5f47d
commit
74191f92bb
2 files changed
+10
-8
No files matched your search
@@ -777,7 +777,15 @@ impl Default for EncodeMetadataOptions<'_> {
|
||||
#[non_exhaustive]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
pub struct EncodeMetadataApplicability {
|
||||
/// The photometric interpretation of the image data.
|
||||
///
|
||||
/// If `None` then metadata tags are not filtered, otherwise only tags applicable to the given
|
||||
/// photometric interpretation are recorded.
|
||||
pub photometric: Option<PhotometricInterpretation>,
|
||||
/// The planar configuration of the image data.
|
||||
///
|
||||
/// If `None` then metadata tags are not filtered, otherwise only tags applicable to the given
|
||||
/// configuration are recorded.
|
||||
pub planar: Option<PlanarConfiguration>,
|
||||
}
|
||||
|
||||
|
||||
@@ -169,16 +169,10 @@ impl TagFilter {
|
||||
Level::Photometric(photometric) => {
|
||||
match (photometric, target.planar, target.photometric) {
|
||||
(Photometric::All, _, _) => Choice::Ok,
|
||||
(Photometric::Planar, Some(PlanarConfiguration::Planar), _) => Choice::Ok,
|
||||
(Photometric::Planar, None, _)
|
||||
if matches!(self.filter_level, FilterLevel::All) =>
|
||||
{
|
||||
(Photometric::Planar, Some(PlanarConfiguration::Planar) | None, _) => {
|
||||
Choice::Ok
|
||||
}
|
||||
(Photometric::YCbCr, _, Some(PhotometricInterpretation::YCbCr)) => Choice::Ok,
|
||||
(Photometric::YCbCr, _, None)
|
||||
if matches!(self.filter_level, FilterLevel::All) =>
|
||||
{
|
||||
(Photometric::YCbCr, _, Some(PhotometricInterpretation::YCbCr) | None) => {
|
||||
Choice::Ok
|
||||
}
|
||||
_ => Choice::Discard,
|
||||
|
||||
Reference in new issue
Block a user