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 withred
,green
,blue
, andalpha
properties (previouslyr
,g
,b
,a
).- This method is deprecated, as
palette.entries
can be accessed directly.
- This method is deprecated, as
palette.firstIndex
andpalette.lastIndex
are deprecated. ThePalette
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.