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

cute_aseprite: Add chunck 0x0004 support #376

Merged
merged 2 commits into from
May 27, 2024
Merged

Conversation

redbug26
Copy link
Contributor

With last version of aseprite (v1.3.2), when we save a file where no alpha is used in the palette, only the chunk 0x0004 is created (not the 0x2019).
0x0004 chunk support is then needed

@redbug26
Copy link
Contributor Author

From doc:

Old palette chunk (0x0004): Ignore this chunk if you find the new palette chunk (0x2019) Aseprite v1.1 saves both chunks 0x0004 and 0x2019 just for backward compatibility.

This chunk is thus mandatory if chunk 2019 is not available.

From source:

Chunk 0x2019 is only available if:
if (pal->size() != 256 || pal->hasAlpha()) {

@redbug26 redbug26 changed the title Add chunck 0x0004 support cute_aseprite: Add chunck 0x0004 support Feb 20, 2024
@RobLoach
Copy link
Contributor

RobLoach commented Apr 8, 2024

Getting one warning when strict compiling....

cute_aseprite.h: In function ‘cute_aseprite_load_from_memory’:
cute_aseprite.h:1014:83: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-Wconversion]
 1014 |                                                 if (skip+l > maxColor) maxColor = skip+l;

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

Successfully merging this pull request may close these issues.

None yet

3 participants