Giter Site home page Giter Site logo

Comments (4)

maxim-zhao avatar maxim-zhao commented on June 12, 2024 1

Fixed in 710664d. It does the palette fixing for you but it does do it silently.

from bmp2tile.

maxim-zhao avatar maxim-zhao commented on June 12, 2024

Selecting two palettes and assigning one per tile is a much more tricky problem than bmp2tile solves right now. It could try to detect if the image is already suitably divided into 8x8 blocks of matching palettes, I suppose.

from bmp2tile.

sdsnatcher avatar sdsnatcher commented on June 12, 2024

I understand. The worst part is to select which of the 32 colors should be on which of the 2 palettes.

But it will be easier if you add the requisite that the artist must have worked with two separate palettes himself.

Then, to populate the palettes on the conversion, you just would have a preliminary step to group the 32 colors as they appear together on the file. Scan tile for tile, then create the two color tables separately, both ordered from the most used color to the least used.

If one of the tables ends up with more than 32 colors, you can issue a warning and:

  1. Move the excessive least used colors from one table to the other
  2. Change the offending pixel of that tile to the closest color in the palette that tile uses

Not perfect, but better than nothing. :)

from bmp2tile.

sverx avatar sverx commented on June 12, 2024

Selecting two palettes and assigning one per tile is a much more tricky problem than bmp2tile solves right now. It could try to detect if the image is already suitably divided into 8x8 blocks of matching palettes, I suppose.

This would be very handy. I suppose while loading the image it could detect that and ask the user if he wants to continue in dual-palette mode, where tiles would work as expected, tilemaps would use the palette bit according to image and palettes would export a 'dual palette' (32 bytes for SMS).

from bmp2tile.

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.