Giter Club home page Giter Club logo

Comments (5)

wvanbergen avatar wvanbergen commented on May 16, 2024

You're right, the palette is is read during decoding and then thrown away. A new palette will be created on save.
Changing this will take some significant work though.

Just curious: why is it important to keep the palette in the same order?

from chunky_png.

beoran avatar beoran commented on May 16, 2024

When working with pixel art,most pixel artists order the palette manually in a specific way. For example, there's a ramp of grayscales, a ramp of red colors, a ramp of greens, etc. This makes it easy to use such a palette in programs such as graphx2, gimp, etc. If the palette's order gets changed, then it also gets jumbled in the user interface of these programs, which is undesirable.

I'm considering using ChunkyPNG for yet another pixel art editor, so I need palette to be preserved. I know it's quite a lot of work, so I forked the repository and I'll poke at it a bit.

from chunky_png.

rolandoam avatar rolandoam commented on May 16, 2024

Just a note about this: there might be times (and I think that most of the times) where you might want to use the current behaviour as the default one. Your case @beoran is a particular case, and while it seems very interesting and useful, most of the users will want just the minimal palette on their pngs.

btw: cool library!!

from chunky_png.

wvanbergen avatar wvanbergen commented on May 16, 2024

Yes, I am not going to implement this myself, although I do welcome patches that implement this, as long as it keeps the standard use case in mind.

from chunky_png.

wvanbergen avatar wvanbergen commented on May 16, 2024

Going to close this; fixing this would be a major rewrite of the library.

from chunky_png.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.