Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encode() Does Not Respect ColorEncoding #81

Open
namse opened this issue Aug 29, 2024 · 1 comment
Open

encode() Does Not Respect ColorEncoding #81

namse opened this issue Aug 29, 2024 · 1 comment

Comments

@namse
Copy link

namse commented Aug 29, 2024

When ColorEncoding is set to luma, num_channels should be 1. However, in the current code, if luma is used, the pixel_format() of EncoderFrame always returns num_channels as 3. This should be 1.

@inflation
Copy link
Owner

The default EncoderFrame is RGB no matter the encoder's settings. You can customize it to your needs.

This is because you don't need to keep the input pixel format and the basic info of the encoder to be precisely the same. You could provide an RGB image buffer to be encoded as greyscale or vice versa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants