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

Ignoring fully transparent pixels #6

Open
yavko opened this issue Jul 24, 2023 · 6 comments
Open

Ignoring fully transparent pixels #6

yavko opened this issue Jul 24, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@yavko
Copy link

yavko commented Jul 24, 2023

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.

@yavko yavko added the enhancement New feature or request label Jul 24, 2023
@ozwaldorf
Copy link
Owner

ozwaldorf commented Jul 24, 2023

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

@ozwaldorf
Copy link
Owner

ozwaldorf commented Jul 31, 2023

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

@donovanglover
Copy link

Transparency branch works great with icon themes, thanks. Would love to see it merged 👍

@yavko
Copy link
Author

yavko commented Jan 3, 2024

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?

@donovanglover
Copy link

https://github.com/vinceliuice/Fluent-icon-theme

Note: I converted svg to png first (svg panics as unsupported)

@Jas-SinghFSU
Copy link

Jas-SinghFSU commented Apr 13, 2024

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

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

When branches are created from issues, their pull requests are automatically linked.

4 participants