1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 23:34:37 +01:00

Implement loading .png and refactor

This commit is contained in:
Ted John
2022-02-24 20:49:35 +00:00
parent e74396b464
commit a977bbaebe
2 changed files with 98 additions and 106 deletions

View File

@@ -2894,10 +2894,14 @@ declare global {
type: 'png';
/**
* How the colours of the .png file are converted to the OpenRCT2 palette.
* If keep is specified for palette, the raw 8bpp .png bytes will be loaded. The palette
* in the .png will not be read. This will improve load performance.
* Closest will find the closest matching colour from the OpenRCT2 palette.
* Dither will add noise to reduce colour banding for images rich in colour.
* If undefined, only colours that are in OpenRCT2 palette will be imported.
*/
palette?: 'keep';
palette?: 'keep' | 'closest' | 'dither';
/**
* Data can either by a: