lutgen-rs
lutgen-rs copied to clipboard
Ignoring fully transparent pixels
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I'd like to use this to modify images to put in my wallpapers, that have transparent bgs
Describe the solution you'd like A clear and concise description of what you want to happen.
to not fill up transparent pixels, but to ignore them
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
maybe just a option for it
Additional context Add any other context or screenshots about the feature request here.
Definitely agree, transparency should be handled properly, although I've been a bit undecided on how to handle it. I think the easiest way would be to always use an alpha layer when reading and writing images, and retain the previous alpha values when writing to the new image. The only issue with that, is that the output image sizes might inflate even more, especially for non-transparent images. Currently, lutgen just reads the image and converts it into an RGB type, not RGBA
Check out https://github.com/ozwaldorf/lutgen-rs/tree/transparency
Or, to install the development branch:
cargo install lutgen --git https://github.com/ozwaldorf/lutgen-rs --branch transparency
Transparency branch works great with icon themes, thanks. Would love to see it merged :+1:
Transparency branch works great with icon themes, thanks. Would love to see it merged 👍
That's a great idea, what icon packs have you tried?
https://github.com/vinceliuice/Fluent-icon-theme
Note: I converted svg to png first (svg panics as unsupported)
How are you using lutgen to ignore transparent background? I ran the cargo install command stated above and ran
lutgen apply *.png -p catppuccin-mocha
But the transparent background gets replaced still.
Edit: Scratch that, found it:
lutgen apply *.png -p catppuccin-mocha --transparency