From bb88d06c782c54f964bac244a5560a41115e8eba Mon Sep 17 00:00:00 2001 From: Martin Boonk Date: Sun, 20 Feb 2022 21:15:34 +0100 Subject: [PATCH] Allow compression to be used --- apps/imageclock/app.js | 2 ++ apps/imageclock/custom.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/imageclock/app.js b/apps/imageclock/app.js index 8e284f39a..4c8b80d16 100644 --- a/apps/imageclock/app.js +++ b/apps/imageclock/app.js @@ -10,6 +10,8 @@ function getImg(resource){ } else if (resource.file){ buffer = E.toArrayBuffer(atob(require("Storage").read(resource.file))); //print("buffer from file"); + } else if (resource.compressed){ + buffer = require("heatshrink").decompress(atob(resource.compressed)); } var result = { diff --git a/apps/imageclock/custom.html b/apps/imageclock/custom.html index 3389c3504..490379af3 100644 --- a/apps/imageclock/custom.html +++ b/apps/imageclock/custom.html @@ -31,7 +31,7 @@ var options = {}; options.diffusion = infoJson.diffusion ? infoJson.diffusion : "none"; - options.compression = false; + options.compression = infoJson.compression ? infoJson.compression : false; options.alphaToColor = false; options.transparent = false; options.inverted = false;