Skip to content

Add support for PNG files with palettes #1287

@pkhead

Description

@pkhead

Using Heaps on HashLink, I discovered the hard way that the engine does not seem to support loading PNG files that use palettes. I wasn't intentionally making a palleteized PNG file; the program I used to create the PNG file (which appears to use lodepng for encoding) would optimize it to use a palette if it did not contain many colors.

Upon loading the PNG image, the program raised this exception:

Unsupported png format 4/3(sprites/teetoe-cheeks.png)
Called from hxd.res.Image.getInfo (hxd/res/Image.hx line 134)
Called from hxd.res.Image.toTile (hxd/res/Image.hx line 671)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions