mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 02:41:09 +00:00
python and C++ AVIF enums [#116]
This commit is contained in:
@@ -16,6 +16,7 @@ const uint8_t TILETYPE_MVT = 0x1;
|
|||||||
const uint8_t TILETYPE_PNG = 0x2;
|
const uint8_t TILETYPE_PNG = 0x2;
|
||||||
const uint8_t TILETYPE_JPEG = 0x3;
|
const uint8_t TILETYPE_JPEG = 0x3;
|
||||||
const uint8_t TILETYPE_WEBP = 0x4;
|
const uint8_t TILETYPE_WEBP = 0x4;
|
||||||
|
const uint8_t TILETYPE_AVIF = 0x5;
|
||||||
|
|
||||||
const uint8_t COMPRESSION_UNKNOWN = 0x0;
|
const uint8_t COMPRESSION_UNKNOWN = 0x0;
|
||||||
const uint8_t COMPRESSION_NONE = 0x1;
|
const uint8_t COMPRESSION_NONE = 0x1;
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ def mbtiles_to_header_json(mbtiles_metadata):
|
|||||||
header["tile_type"] = TileType.JPEG
|
header["tile_type"] = TileType.JPEG
|
||||||
elif tile_format == "webp":
|
elif tile_format == "webp":
|
||||||
header["tile_type"] = TileType.WEBP
|
header["tile_type"] = TileType.WEBP
|
||||||
|
elif tile_format == "avif":
|
||||||
|
header["tile_type"] = TileType.AVIF
|
||||||
else:
|
else:
|
||||||
header["tile_type"] = TileType.UNKNOWN
|
header["tile_type"] = TileType.UNKNOWN
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ class TileType(Enum):
|
|||||||
PNG = 2
|
PNG = 2
|
||||||
JPEG = 3
|
JPEG = 3
|
||||||
WEBP = 4
|
WEBP = 4
|
||||||
|
AVIF = 5
|
||||||
|
|
||||||
|
|
||||||
def deserialize_directory(buf):
|
def deserialize_directory(buf):
|
||||||
|
|||||||
Reference in New Issue
Block a user