The tile server [1] I'd like to use only provides JPEG tiles and `mepo`
currently refuses to load anything else than PNGs.
As nothing else in the code seems to depend on the PNG format
specifically and SDL can handle any image type it supports, this change
just adds a check for JPEG images.
Tested with tile server [1] (zoom in to Switzerland to see something).
[1] https://wmts.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte-farbe/default/current/3857/%3$d/%1$d/%2$d.jpeg
---
src/TileCache.zig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Thanks for sending - and apologies for the extended delay for review,
been caught up in a few other things.
JPEG support sounds good to me & this mostly looks good. However, we
would also need to modify the other references in the code for JPEG
support as well.
In src/Mepo.zig:
- We would replace IMG_INIT_PNG to be IMG_INIT_PNG | IMG_INIT_JPG
In src/TileCache.zig:
- png_path fn would need to be replaced to support .png or .jpg
- As is current design with patch we'd be writing JPG data to .png files
- Other references / labels for png would need to be replaced
Miles