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

Encode PNG with specific palette and samples information #69

Open
pladaria opened this issue May 31, 2021 · 1 comment
Open

Encode PNG with specific palette and samples information #69

pladaria opened this issue May 31, 2021 · 1 comment

Comments

@pladaria
Copy link

pladaria commented May 31, 2021

I made a simple image editor which allows you to edit the image palette.
I want to save the PNG with a specific palette and indexed samples. Is it possible to achieve this using this library? I was unable to find any reference to that in the documentation.

In UPNG.encodeLL(imgs, w, h, cc, ac, depth, [dels]) there's no way to provide palette

@photopea
Copy link
Owner

photopea commented May 31, 2021

We do not provide a way of specifying a palette.

Just make sure your raw image (the input of UPNG.encode()) consists only of colours of your palette, and Photopea will detect and use that palette as a PNG palette.

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