From 691e7873e5ea7f0c19cb23aaac588f9e866a599d Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Sun, 3 Mar 2019 14:00:47 +0100 Subject: [PATCH] Response from processing image updated to include the size variations per image. --- processor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/processor.py b/processor.py index f5c31ee..406d770 100644 --- a/processor.py +++ b/processor.py @@ -35,7 +35,10 @@ def processImage(file, outputPath=None): filename = generateFilename(fileID, size['name'], outputPath) temp.save(filename) - return '.'.join([fileID, OUTPUT_EXTENSION]) + return { + 'filename': '.'.join([fileID, OUTPUT_EXTENSION]), + 'variations': list(map(lambda vairation: vairation['name'], OUTPUT_SIZES)) + } def generateFilename(fileID, modifier, outputPath): filename = "{}_{}.{}".format(fileID, modifier, OUTPUT_EXTENSION)