-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
Need Imlib2 alternative for Wayland #1845
Labels
display: wayland
Issue related to Wayland backend
lua
Issue or PR related to Lua code
question
Issue where reporter seeks information
rendering
Issue or PR related to rendering
Milestone
Comments
Caellian
added
question
Issue where reporter seeks information
display: wayland
Issue related to Wayland backend
lua
Issue or PR related to Lua code
rendering
Issue or PR related to rendering
labels
Apr 19, 2024
A good option in Rust would be image-rs/image and it supports a lot of formats. But it comes without C bindings, so we'd need to write those... and add Rust to build requirements. The up sides are:
We can use cbindgen by mozilla (if that means "stable") to generate bindings, but we'd still need to write C API wrapper. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
display: wayland
Issue related to Wayland backend
lua
Issue or PR related to Lua code
question
Issue where reporter seeks information
rendering
Issue or PR related to rendering
Imlib2 doesn't work for Wayland because it requires X11. As we provide bindings to Imlib2 for Lua, we need to find an alternative that's similar in functionality for Wayland.
Imlib2 supports following features:
Not sure if such a thing exists even. So this is an open ended question - let me know if you know of any.
Direct Wayland support isn't really a hard requirement though. It seems these days libraries tend to be much smaller in scope (which is a good thing ig), so we might end up having to combine multiple different libraries:
I can't find which formats Imlib2 supports, but Imlib supports PPM, PGM, TIFF, PNG, XPM, JPEG and EIM, so I guess maybe a few more. Most images these days come in PNG, JPEG, BMP and WebP, so I guess those are a good starting place. Loader for BMP format can probably be copied from SO bc it's simple.
Important detail to keep in mind is that image loading and manipulation are very susceptible to arbitrary (malicious) code execution, so any work on this has to be triple-checked.
The text was updated successfully, but these errors were encountered: