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

Exporting sprite sheet - libpng: Wrote palette index exceeding num_palette #353

Open
pseiler opened this issue Feb 27, 2022 · 1 comment

Comments

@pseiler
Copy link

pseiler commented Feb 27, 2022

LibreSprite version

Version 1.0 (AppImage)

Describe the bug

When I try to export a spritesheet, I get the following error:

libpng: Wrote palette index exceeding num_palette
Error saving frame 1 in the file "/home/user/tux.png"
To Reproduce
Expected behaviour

Download this libresprite file here.

OS/Hardware
  • Operative System: openSUSE 15.3 x86_64
  • CPU: some Intel i5
Additional context

Aseprite seems to have this bug already fixed.
aseprite/aseprite#2842

@tbsp
Copy link

tbsp commented Sep 15, 2022

I can reproduce this error consistently with the following steps:

  • Create a new indexed image, white background
  • Load the preset a64 palette (any palette will likely do, though I haven't tried them all)
  • Save the image as a png, error occurs

The problem appears to be the image is filled with an out-of-range palette index (but looks like it's full of index 0). Filling the entire canvas with the paint bucket before doing anything else will clear out the out-of-range color and prevent the error. If something is already drawn the magic wand tool is able to distinguish the color and select it, to identify areas to fill with a valid color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants