main
Bob Mottram 2021-08-13 18:43:19 +01:00
parent c98d862a7b
commit 65247e3bab
1 changed files with 2 additions and 1 deletions

View File

@ -121,6 +121,7 @@ def _convertImageToLowBandwidth(imageFilename: str) -> None:
'/usr/bin/convert -resize 50% +noise Multiplicative ' + \
'-evaluate median 10% -dither Floyd-Steinberg ' + \
'-monochrome ' + imageFilename + ' ' + imageFilename
print('Low bandwidth image conversion: ' + cmd)
subprocess.call(cmd, shell=True)
@ -272,7 +273,7 @@ def attachMedia(baseDir: str, httpPrefix: str,
if baseDir:
if mediaType.startswith('image/'):
if lowBandwidth:
if lowBandwidth:
_convertImageToLowBandwidth(imageFilename)
processMetaData(baseDir, nickname, domain,
imageFilename, mediaFilename, city)