Skip to content

Version 2.10: Full Support for New Aseprite Palette Storage

Latest
Compare
Choose a tag to compare
@miriti miriti released this 26 May 16:55

This update introduces significant changes to how palettes are stored in Aseprite files.

Previously, we always expected to find and use the Palette Chunk (0x2019) for reading and writing palettes. With this update, if the palette contains 256 colors or fewer and none of them have an alpha channel, the "Old Palette" chunk (0x004) is used instead, and the regular Palette Chunk is no longer written to the file.

The 2.0.4 patch of ase fixed "Null access" crashes when attempting to read newer Aseprite files that lack the regular palette chunk.

This release fully supports the new palette storage method in Aseprite files.

Breaking Changes

This release introduces some breaking changes:

  • palette.chunk no longer exists.
  • palette.getEntry() now returns an object with red, green, blue, and alpha properties (previously r, g, b, a).
    • This method is deprecated, as palette.entries can be accessed directly.
  • palette.firstIndex and palette.lastIndex are deprecated. The Palette class now always stores color entries in a simple array, rendering these properties unnecessary.

Additional Information

  • The ase.Palette class has been refactored. It is now an independent abstraction that can be created from both old and regular Palette chunks and can be serialized to either format.