forked from indymedia/epicyon
Add a focal point to images
parent
7d41bdf3f9
commit
839b4b7b5b
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
||||||
APP=epicyon
|
APP=epicyon
|
||||||
VERSION=1.2
|
VERSION=1.1.0
|
||||||
|
|
||||||
all:
|
all:
|
||||||
debug:
|
debug:
|
||||||
|
|
6
media.py
6
media.py
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue