mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-25 01:57:53 +01:00
Merge pull request #3241 from silentnoodlemaster/v3.0
Add option to use lossless webp format
This commit is contained in:
commit
bc1fa86823
@ -73,7 +73,8 @@ public abstract class MapType {
|
||||
FORMAT_WEBP("webp", 85, ImageEncoding.WEBP),
|
||||
FORMAT_WEBP90("webp-q90", 90, ImageEncoding.WEBP),
|
||||
FORMAT_WEBP95("webp-q95", 95, ImageEncoding.WEBP),
|
||||
FORMAT_WEBP100("webp-q100", 100, ImageEncoding.WEBP);
|
||||
FORMAT_WEBP100("webp-q100", 100, ImageEncoding.WEBP),
|
||||
FORMAT_WEBPL("webp-l", 85, ImageEncoding.WEBP);
|
||||
String id;
|
||||
float qual;
|
||||
ImageEncoding enc;
|
||||
|
@ -59,7 +59,7 @@ public class ImageIOManager {
|
||||
fos.close();
|
||||
// Run encoder to new new temp file
|
||||
File tmpfile2 = File.createTempFile("pngToWebp", "webp");
|
||||
String args[] = { core.getCWEBPPath(), "-q", Integer.toString((int)fmt.getQuality()), tmpfile.getAbsolutePath(), "-o", tmpfile2.getAbsolutePath() };
|
||||
String args[] = { core.getCWEBPPath(), fmt.getID().endsWith("-l")?"-lossless":"", "-q", Integer.toString((int)fmt.getQuality()), tmpfile.getAbsolutePath(), "-o", tmpfile2.getAbsolutePath() };
|
||||
Process pr = Runtime.getRuntime().exec(args);
|
||||
try {
|
||||
pr.waitFor();
|
||||
|
@ -254,7 +254,7 @@ block-alias:
|
||||
# "minecraft:quartz_ore": "stone"
|
||||
# "diamond_ore": "coal_ore"
|
||||
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100),
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l),
|
||||
# Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download)
|
||||
#
|
||||
# Has no effect on maps with explicit format settings
|
||||
|
@ -254,7 +254,7 @@ block-alias:
|
||||
# "minecraft:quartz_ore": "stone"
|
||||
# "diamond_ore": "coal_ore"
|
||||
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100),
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l),
|
||||
# Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download)
|
||||
#
|
||||
# Has no effect on maps with explicit format settings
|
||||
|
@ -254,7 +254,7 @@ block-alias:
|
||||
# "minecraft:quartz_ore": "stone"
|
||||
# "diamond_ore": "coal_ore"
|
||||
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100),
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l),
|
||||
# Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download)
|
||||
#
|
||||
# Has no effect on maps with explicit format settings
|
||||
|
@ -254,7 +254,7 @@ block-alias:
|
||||
# "minecraft:quartz_ore": "stone"
|
||||
# "diamond_ore": "coal_ore"
|
||||
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100),
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l),
|
||||
# Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download)
|
||||
#
|
||||
# Has no effect on maps with explicit format settings
|
||||
|
@ -254,7 +254,7 @@ block-alias:
|
||||
# "minecraft:quartz_ore": "stone"
|
||||
# "diamond_ore": "coal_ore"
|
||||
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100),
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l),
|
||||
# Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download)
|
||||
#
|
||||
# Has no effect on maps with explicit format settings
|
||||
|
@ -254,7 +254,7 @@ block-alias:
|
||||
# "minecraft:quartz_ore": "stone"
|
||||
# "diamond_ore": "coal_ore"
|
||||
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100),
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l),
|
||||
# Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download)
|
||||
#
|
||||
# Has no effect on maps with explicit format settings
|
||||
|
@ -254,7 +254,7 @@ block-alias:
|
||||
# "minecraft:quartz_ore": "stone"
|
||||
# "diamond_ore": "coal_ore"
|
||||
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100),
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l),
|
||||
# Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download)
|
||||
#
|
||||
# Has no effect on maps with explicit format settings
|
||||
|
@ -254,7 +254,7 @@ block-alias:
|
||||
# "minecraft:quartz_ore": "stone"
|
||||
# "diamond_ore": "coal_ore"
|
||||
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100),
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l),
|
||||
# Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download)
|
||||
#
|
||||
# Has no effect on maps with explicit format settings
|
||||
|
@ -254,7 +254,7 @@ block-alias:
|
||||
# "minecraft:quartz_ore": "stone"
|
||||
# "diamond_ore": "coal_ore"
|
||||
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100),
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l),
|
||||
# Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download)
|
||||
#
|
||||
# Has no effect on maps with explicit format settings
|
||||
|
@ -254,7 +254,7 @@ block-alias:
|
||||
# "minecraft:quartz_ore": "stone"
|
||||
# "diamond_ore": "coal_ore"
|
||||
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100),
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l),
|
||||
# Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download)
|
||||
#
|
||||
# Has no effect on maps with explicit format settings
|
||||
|
@ -254,7 +254,7 @@ block-alias:
|
||||
# "minecraft:quartz_ore": "stone"
|
||||
# "diamond_ore": "coal_ore"
|
||||
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100),
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l),
|
||||
# Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download)
|
||||
#
|
||||
# Has no effect on maps with explicit format settings
|
||||
|
@ -255,7 +255,7 @@ block-alias:
|
||||
# "minecraft:quartz_ore": "stone"
|
||||
# "diamond_ore": "coal_ore"
|
||||
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100),
|
||||
# Default image format for HDMaps (png, jpg, jpg-q75, jpg-q80, jpg-q85, jpg-q90, jpg-q95, jpg-q100, webp, webp-q75, webp-q80, webp-q85, webp-q90, webp-q95, webp-q100, wepb-l),
|
||||
# Note: any webp format requires the presence of the 'webp command line tools' (cwebp, dwebp) (https://developers.google.com/speed/webp/download)
|
||||
#
|
||||
# Has no effect on maps with explicit format settings
|
||||
|
Loading…
Reference in New Issue
Block a user