diff options
| author | tassaron | 2017-05-28 14:19:28 -0400 |
|---|---|---|
| committer | tassaron | 2017-05-28 14:19:28 -0400 |
| commit | e0eed5bff4316910a93937d904f1a913f365a252 (patch) | |
| tree | 5ed9ebe270c5bde6ca716916e15c7720e75cce38 /core.py | |
| parent | d9a5f2dd34c0bf14bfc99b58183b00d43217d889 (diff) | |
title text is now a component
plus numerous bugs removed and added
Diffstat (limited to 'core.py')
| -rw-r--r-- | core.py | 20 |
1 files changed, 2 insertions, 18 deletions
@@ -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) |
