mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-02 05:49:06 +02:00
core, viewer: add support for WebP output
WebP can be selected by passing `--image-format webp` on the command line. For typical Minecraft worlds, this results in a size reduction of 10-15% without increasing processing time.
This commit is contained in:
parent
bb11b29e92
commit
c23b53a8c3
11 changed files with 81 additions and 11 deletions
|
@ -61,6 +61,8 @@ struct Metadata<'t> {
|
|||
spawn: Spawn,
|
||||
/// Enabled MinedMap features
|
||||
features: Features,
|
||||
/// Format of generated map tiles
|
||||
tile_extension: &'static str,
|
||||
}
|
||||
|
||||
/// Viewer entity JSON data structure
|
||||
|
@ -205,6 +207,7 @@ impl<'a> MetadataWriter<'a> {
|
|||
mipmaps: Vec::new(),
|
||||
spawn: Self::spawn(&level_dat),
|
||||
features,
|
||||
tile_extension: self.config.tile_extension(),
|
||||
};
|
||||
|
||||
for tile_map in self.tiles.iter() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue