aboutsummaryrefslogtreecommitdiff
path: root/filmstripper.py
diff options
context:
space:
mode:
authorSan Jacobs2020-05-12 16:55:34 +0200
committerSan Jacobs2020-05-12 16:55:34 +0200
commit87e81b9014629ad27f9d354c61973a01d54cb884 (patch)
treed4129a65204620a41410daf08959bd86be7a4445 /filmstripper.py
parent455ad0f5cfd4ec02d161f16c83ddb027e52dae38 (diff)
downloadfilmstripper-87e81b9014629ad27f9d354c61973a01d54cb884.tar.gz
filmstripper-87e81b9014629ad27f9d354c61973a01d54cb884.tar.bz2
filmstripper-87e81b9014629ad27f9d354c61973a01d54cb884.zip
Beautification
Bringing the code a bit closer to PEP8, even though it's not something I'm particularly concerned about.
Diffstat (limited to 'filmstripper.py')
-rw-r--r--filmstripper.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/filmstripper.py b/filmstripper.py
index 4bf2ff5..98a16fc 100644
--- a/filmstripper.py
+++ b/filmstripper.py
@@ -8,6 +8,7 @@ from os import path
broke = False
+
def brkck(**args):
forcer = None
if args:
@@ -128,12 +129,13 @@ print("Width: "+str(filmstrip.width))
print("Height: "+str(filmstrip.height))
print("Colorspace: "+filmstrip.mode)
+
# Adding each image to filmstrip
for eachFile in fileList:
print("Loading "+eachFile+"...")
eachImage = Image.open(eachFile)
-
+
# Checking files for compatabililty
if inputExtension not in eachFile:
@@ -148,7 +150,7 @@ for eachFile in fileList:
if eachImage.mode != filmstrip.mode:
print("ERROR: Image colorspace mismatch")
brkck()
-
+
extendedStrip = filmstrip.crop(box=(0, 0, filmstrip.width+widthAdd, filmstrip.height+heightAdd))
extendedStrip.paste(eachImage, (extendedStrip.width-width, extendedStrip.height-height))
filmstrip = extendedStrip