From 839b4b7b5bfe019a8360f7f6c3530941b12716c2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 9 Mar 2020 17:40:00 +0000 Subject: [PATCH] Add a focal point to images --- Makefile | 2 +- media.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 36283df5..3ecb8b12 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ APP=epicyon -VERSION=1.2 +VERSION=1.1.0 all: debug: diff --git a/media.py b/media.py index 631138df..a9a9ef8e 100644 --- a/media.py +++ b/media.py @@ -162,8 +162,10 @@ def attachMedia(baseDir: str,httpPrefix: str,domain: str,port: int, \ 'type': 'Document', 'url': httpPrefix+'://'+domain+'/'+mediaPath } - if useBlurhash and mediaType.startswith('image/'): - attachmentJson['blurhash']=getImageHash(imageFilename) + if mediaType.startswith('image/'): + attachmentJson['focialPoint']={0.0, 0.0} + if useBlurhash: + attachmentJson['blurhash']=getImageHash(imageFilename) postJson['attachment']=[attachmentJson] if baseDir: