From e0eed5bff4316910a93937d904f1a913f365a252 Mon Sep 17 00:00:00 2001 From: tassaron Date: Sun, 28 May 2017 14:19:28 -0400 Subject: title text is now a component plus numerous bugs removed and added --- core.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'core.py') diff --git a/core.py b/core.py index c8bfbca..5478f93 100644 --- a/core.py +++ b/core.py @@ -1,11 +1,9 @@ import sys, io, os from PyQt4 import QtCore, QtGui, uic -from PyQt4.QtGui import QPainter, QColor from os.path import expanduser import subprocess as sp import numpy -from PIL import Image, ImageDraw, ImageFont -from PIL.ImageQt import ImageQt +from PIL import Image import tempfile from shutil import rmtree import atexit @@ -34,7 +32,7 @@ class Core(): def parseBaseImage(self, backgroundImage, preview=False): ''' determines if the base image is a single frame or list of frames ''' if backgroundImage == "": - return [] + return [''] else: _, bgExt = os.path.splitext(backgroundImage) if not bgExt == '.mp4': @@ -112,17 +110,3 @@ class Core(): shell=True ) return sorted([os.path.join(self.tempDir, f) for f in os.listdir(self.tempDir)]) - - @staticmethod - def RGBFromString(string): - ''' turns an RGB string like "255, 255, 255" into a tuple ''' - try: - tup = tuple([int(i) for i in string.split(',')]) - if len(tup) != 3: - raise ValueError - for i in tup: - if i > 255 or i < 0: - raise ValueError - return tup - except: - return (255, 255, 255) -- cgit v1.2.3