-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: add support for BGR888 image format #82
Conversation
Hi I am on my phone so I can't give a full verdict yet. However the patch looks fine to me with just 1 concern. Please correct me if my understanding is incorrect, but you're coercing the dynamic image into rgba8 - is it possible to let image crate pick the highest supported bit channel? Eg: 12 bit / 16 bit? |
@Decodetalkers any comments? |
You're right. I've pushed a new commit to avoid that. Most of this happens in the |
Emm. I think it should be ok |
Yep this seems fine to me. |
I'll test the pr rq and go ahead with the merge once I get home. |
TY :) |
Hey sorry for the late response! @Decodetalkers can you merge this PR? I'll mirror it to sourcehut when I'm home. Just drop a message in this thread once you merge. |
Ok |
Hello,
I use the dev version of Sway with NVidia proprietary drivers and I'm unable to take a screenshot using Wayshot.
Turns out that with my setup, the frame format is BGR888, which is not supported yet. So here is a small PR that seems to make it work for me.
BGR888 is a 3-byte-per-pixel frame format with no transparency, unlike other formats used so far. So in
convert_inplace
, there is no room in the buffer to turn it into an RGBA image. As a workaround, I use aDynamicImage
type in subsequent operations to handle both RGB and RGBA formats.I'm aware this may not be the best solution, please let me know if there is anything I can do to improve this code :)