Add a focal point to images

main
Bob Mottram 2020-03-09 17:40:00 +00:00
parent 7d41bdf3f9
commit 839b4b7b5b
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,5 @@
APP=epicyon APP=epicyon
VERSION=1.2 VERSION=1.1.0
all: all:
debug: debug:

View File

@ -162,8 +162,10 @@ def attachMedia(baseDir: str,httpPrefix: str,domain: str,port: int, \
'type': 'Document', 'type': 'Document',
'url': httpPrefix+'://'+domain+'/'+mediaPath 'url': httpPrefix+'://'+domain+'/'+mediaPath
} }
if useBlurhash and mediaType.startswith('image/'): if mediaType.startswith('image/'):
attachmentJson['blurhash']=getImageHash(imageFilename) attachmentJson['focialPoint']={0.0, 0.0}
if useBlurhash:
attachmentJson['blurhash']=getImageHash(imageFilename)
postJson['attachment']=[attachmentJson] postJson['attachment']=[attachmentJson]
if baseDir: if baseDir: