MCPcopy Create free account
hub / github.com/RustCV/RustCV / from

Method from

rustcv-core/src/pixel_format.rs:131–136  ·  view source on GitHub ↗
(val: u32)

Source from the content-addressed store, hash-verified

129
130impl From<u32> for PixelFormat {
131 fn from(val: u32) -> Self {
132 // 这里可以维护一个已知列表的查找
133 // 简化起见,我们假设只要是上面定义的常量都算 Known
134 // 在实际工程中,这里会有一个 match 匹配所有常量
135 Self::Known(FourCC(val))
136 }
137}
138
139impl From<FourCC> for PixelFormat {

Callers

nothing calls this directly

Calls 1

FourCCClass · 0.85

Tested by

no test coverage detected