Skip to content

Commit

Permalink
Add missing read/write for MHC2Tag
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Feb 27, 2024
1 parent 3730909 commit a741224
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lcms2"
version = "6.0.4"
version = "6.1.0"
authors = ["Kornel Lesiński <[email protected]>"]
description = "ICC color profile handling. Rusty wrapper for Little CMS"
keywords = ["icc", "profile", "color", "lcms"]
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ pub enum Tag<'a> {
UcrBg(&'a ffi::UcrBg),
VcgtCurves([&'a ToneCurveRef; 3]),
VideoSignal(&'a ffi::VideoSignalType),
MHC2(&'a ffi::MHC2Type),
/// Unknown format or missing data
None,
}
Expand Down
5 changes: 5 additions & 0 deletions src/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ impl<'a> Tag<'a> {
(CicpTag, &Tag::VideoSignal(data)) => {
data as *const ffi::VideoSignalType as *const u8
},
(MHC2Tag, &Tag::MHC2(data)) => {
data as *const ffi::MHC2Type as *const u8
},
(sig, _) => panic!("Signature type {sig:?} does not support this tag data type"),
}
}
Expand Down Expand Up @@ -189,6 +192,8 @@ impl<'a> Tag<'a> {
])
},
ViewingConditionsTag => Tag::ICCViewingConditions(cast(data)),
CicpTag => Tag::VideoSignal(cast(data)),
MHC2Tag => Tag::MHC2(cast(data)),
_ => Tag::None,
}
}
Expand Down
2 changes: 1 addition & 1 deletion sys
Submodule sys updated 3 files
+1 −1 Cargo.toml
+8 −1 src/ffi.rs
+1 −1 vendor

0 comments on commit a741224

Please sign in to comment.