From 86fc9d669fa4ef195df15d587e84cdeece7c1180 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 12 Feb 2022 22:58:43 +0100 Subject: [PATCH] Basic handler for diff rendering --- changedetectionio/__init__.py | 10 ++++++++++ changedetectionio/templates/diff-image.html | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 1535fd32..4f7c1dd8 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -801,6 +801,16 @@ def changedetection_app(config=None, datastore_o=None): logs=notification_debug_log if len(notification_debug_log) else ["No errors or warnings detected"]) return output + + # render an image which contains the diff of two images + @app.route("/diff/image///") + def render_diff_image(uuid, first_date, second_date): + from flask import make_response + resp = make_response("xxxxx") + resp.headers['Content-Type'] = 'image/jpeg' + return resp + + @app.route("/api//snapshot/current", methods=['GET']) @login_required def api_snapshot(uuid): diff --git a/changedetectionio/templates/diff-image.html b/changedetectionio/templates/diff-image.html index 3d79ceae..9e3b81e9 100644 --- a/changedetectionio/templates/diff-image.html +++ b/changedetectionio/templates/diff-image.html @@ -23,7 +23,7 @@
- +