diff --git a/src/util/format/pixel.rs b/src/util/format/pixel.rs index 79bbd43..d69bd4e 100644 --- a/src/util/format/pixel.rs +++ b/src/util/format/pixel.rs @@ -312,6 +312,12 @@ impl Descriptor { self.ptr } + pub fn nb_components(self) -> u8 { + unsafe { + (*self.as_ptr()).nb_components + } + } + pub fn log2_chroma_h(self) -> u8 { unsafe { (*self.as_ptr()).log2_chroma_h