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

Possibility of adding liq_image_create_argb() #392

Closed
Bill-Stewart-1 opened this issue Jan 12, 2022 · 1 comment
Closed

Possibility of adding liq_image_create_argb() #392

Bill-Stewart-1 opened this issue Jan 12, 2022 · 1 comment

Comments

@Bill-Stewart-1
Copy link

It is currently difficult to use libimagequant to work with Cairo or X buffers because they are ARGB and libimagequant only has data import for RGBA pixels. It would be very helpful to have an import option that works on the buffers without having to rebuild them pixel by pixel first. The export function is less of a concern because the output is typically right to a file, not back to the original buffer.

@kornelski
Copy link
Owner

kornelski commented Jan 12, 2022

I suggest using byte-swapping callback for this:

https://pngquant.org/lib/#liq_image_create_custom

Any function I can add is going to do precisely this, or copy and swap pixels, because the rest of the codebase uses rgba. To have an argb-native version I'd have to make huge copy'n'paste and double the code size.

@kornelski kornelski closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2023
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

No branches or pull requests

2 participants