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

Support 10-bit screenshots by downsampling to 8-bit #18

Merged
merged 1 commit into from
Nov 27, 2022

Conversation

quantum5
Copy link

This commit introduces support for all eight 10-bit colour formats supported by wl_shm.

le32toh is used to convert little endian pixels to host endianness. This function is available on Linux in <endian.h> and FreeBSD in <sys/endian.h>.

For readability, the if/else chain is converted into a switch.

This fixes mortie#80.

This commit introduces support for all eight 10-bit colour formats
supported by wl_shm.

le32toh is used to convert little endian pixels to host endianness.
This function is available on Linux in <endian.h> and FreeBSD in
<sys/endian.h>.

For readability, the if/else chain is converted into a switch.
@jirutka
Copy link
Owner

jirutka commented Nov 27, 2022

Can you please compare it with #16? It seems that it’s solving the same problem…?

@quantum5
Copy link
Author

quantum5 commented Nov 27, 2022

Seems like it's solving a similar but different problem as #16. #16 is for RGB888 and BGR888, this one is for ARGB2101010 and all variations of it.

@jirutka jirutka merged commit a1cf657 into jirutka:master Nov 27, 2022
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

Successfully merging this pull request may close these issues.

10-bit colour handling
2 participants