l1npengtul / nokhwa

Cross Platform Rust Library for Powerful Webcam/Camera Capture
Apache License 2.0
537 stars 137 forks source link

fourcc for grayscale #93

Closed wegmarken2006 closed 1 year ago

wegmarken2006 commented 1 year ago

Hello, fourcc for grayscale should be "GREY" instead of "GRAY".

l1npengtul commented 1 year ago

The difference between GRAY and GREY is reginal (american vs british)

I do not see a reason to change this, it conveys the message fine.

In future versions this will be called Luma, but for now there is no reason to change this.

wegmarken2006 commented 1 year ago

I was not talking about the name used in the FrameFormat enum, which of course can be anything; I was talking about the string that is actually sent to the OS like in the write() below: FrameFormat::GRAY => { write!(f, "GRAY") } I don't know if I am missing something, I am using a yocto built linux, and the string "GRAY" is not recognized, see also https://www.kernel.org/doc/html/v4.10/media/uapi/v4l/pixfmt-grey.html

l1npengtul commented 1 year ago

We don't follow convention of a single platform. FrameFormat is nokhwa's own way of handling 4CCs, and we don't plan on word for word compatibility with v4l2