Closed sys-liqian closed 3 years ago
Thanks @buddhistSystem for the detailed write-up. I based this too much off an example tileset without studying the specification closely enough.
I went with a simplified approach that just checks for the RIFF
part of the header; none of the other RIFF
formats look like things that would be stored in a mbtiles file.
Please feel free to reopen this issue if the latest changes do not resolve this bug.
I use mbtilesserver v0.6.1 My tile is webp format. Program execution error : Could not detect tile format
The basic element of a RIFF file is a chunk. It consists of:
Chunk size is variable So i think can't use []byte("\x52\x49\x46\x46\xc0\x00\x00\x00\x57\x45\x42\x50\x56\x50") to verify whether it is webp
I changed the program to the following figure: The program passed