mirror of
https://github.com/ciromattia/kcc
synced 2026-01-30 08:57:40 +00:00
Updated to Pillow 2.3.0
This commit is contained in:
@@ -24,7 +24,6 @@ You can find the latest released binary at the following links:
|
||||
- **Windows:** [http://kcc.vulturis.eu/Windows/](http://kcc.vulturis.eu/Windows/)
|
||||
- **Linux:** [http://kcc.vulturis.eu/Linux/](http://kcc.vulturis.eu/Linux/)
|
||||
- **OS X (10.8 or later):** [http://kcc.vulturis.eu/OSX/](http://kcc.vulturis.eu/OSX/)
|
||||
- **OS X (10.7 or earlier):** Soon™
|
||||
|
||||
## INPUT FORMATS
|
||||
**KCC** can understand and convert, at the moment, the following input types:
|
||||
@@ -43,7 +42,7 @@ You can find the latest released binary at the following links:
|
||||
### For compiling/running from source:
|
||||
- Python 2.7 - Included in MacOS and Linux, follow the [official documentation](http://www.python.org/getit/windows/) to install on Windows.
|
||||
- [PyQt4](http://www.riverbankcomputing.co.uk/software/pyqt/download) - Please refer to official documentation for installing into your system.
|
||||
- [Pillow](http://pypi.python.org/pypi/Pillow/) 2.2.1+ - For comic optimizations. Please refer to official documentation for installing into your system.
|
||||
- [Pillow](http://pypi.python.org/pypi/Pillow/) 2.3.0+ - For comic optimizations. Please refer to official documentation for installing into your system.
|
||||
- [Psutil](https://code.google.com/p/psutil/) - Please refer to official documentation for installing into your system.
|
||||
- **To build OS X release you need a modified QT:** [patch](https://github.com/ciromattia/kcc/blob/master/other/QT-4.8.5-QListWidget.patch)
|
||||
|
||||
|
||||
2
kcc.py
2
kcc.py
@@ -26,7 +26,7 @@ __docformat__ = 'restructuredtext en'
|
||||
import sys
|
||||
import os
|
||||
try:
|
||||
#noinspection PyUnresolvedReferences
|
||||
# noinspection PyUnresolvedReferences
|
||||
from PyQt4 import QtCore, QtGui, QtNetwork
|
||||
except ImportError:
|
||||
print "ERROR: PyQT4 is not installed!"
|
||||
|
||||
@@ -40,7 +40,7 @@ from xml.dom.minidom import parse
|
||||
from HTMLParser import HTMLParser
|
||||
from KCC_rc_web import WebContent
|
||||
try:
|
||||
#noinspection PyUnresolvedReferences
|
||||
# noinspection PyUnresolvedReferences
|
||||
from psutil import TOTAL_PHYMEM, Popen
|
||||
except ImportError:
|
||||
print "ERROR: Psutil is not installed!"
|
||||
|
||||
@@ -26,7 +26,7 @@ import locale
|
||||
from sys import platform
|
||||
from subprocess import STDOUT, PIPE
|
||||
try:
|
||||
#noinspection PyUnresolvedReferences
|
||||
# noinspection PyUnresolvedReferences
|
||||
from psutil import Popen
|
||||
except ImportError:
|
||||
print "ERROR: Psutil is not installed!"
|
||||
|
||||
@@ -35,6 +35,27 @@ from optparse import OptionParser, OptionGroup
|
||||
from multiprocessing import Pool, freeze_support
|
||||
from xml.dom.minidom import parse
|
||||
from uuid import uuid4
|
||||
try:
|
||||
# noinspection PyUnresolvedReferences
|
||||
from PIL import Image
|
||||
if tuple(map(int, ('2.3.0'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))):
|
||||
print "ERROR: Pillow 2.3.0 or newer is required!"
|
||||
if sys.platform.startswith('linux'):
|
||||
import Tkinter
|
||||
import tkMessageBox
|
||||
importRoot = Tkinter.Tk()
|
||||
importRoot.withdraw()
|
||||
tkMessageBox.showerror("KCC - Error", "Pillow 2.3.0 or newer is required!")
|
||||
exit(1)
|
||||
except ImportError:
|
||||
print "ERROR: Pillow is not installed!"
|
||||
if sys.platform.startswith('linux'):
|
||||
import Tkinter
|
||||
import tkMessageBox
|
||||
importRoot = Tkinter.Tk()
|
||||
importRoot.withdraw()
|
||||
tkMessageBox.showerror("KCC - Error", "Pillow 2.3.0 or newer is required!")
|
||||
exit(1)
|
||||
try:
|
||||
from PyQt4 import QtCore
|
||||
except ImportError:
|
||||
|
||||
@@ -29,29 +29,25 @@ from shutil import rmtree, copytree, move
|
||||
from optparse import OptionParser, OptionGroup
|
||||
from multiprocessing import Pool, freeze_support
|
||||
try:
|
||||
#noinspection PyUnresolvedReferences
|
||||
# noinspection PyUnresolvedReferences
|
||||
from PIL import Image, ImageStat
|
||||
if tuple(map(int, ('2.2.1'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))):
|
||||
print "ERROR: Pillow 2.2.1 or newer is required!"
|
||||
if tuple(map(int, ('2.3.0'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))):
|
||||
print "ERROR: Pillow 2.3.0 or newer is required!"
|
||||
if sys.platform.startswith('linux'):
|
||||
#noinspection PyUnresolvedReferences
|
||||
import Tkinter
|
||||
#noinspection PyUnresolvedReferences
|
||||
import tkMessageBox
|
||||
importRoot = Tkinter.Tk()
|
||||
importRoot.withdraw()
|
||||
tkMessageBox.showerror("KCC - Error", "Pillow 2.2.1 or newer is required!")
|
||||
tkMessageBox.showerror("KCC - Error", "Pillow 2.3.0 or newer is required!")
|
||||
exit(1)
|
||||
except ImportError:
|
||||
print "ERROR: Pillow is not installed!"
|
||||
if sys.platform.startswith('linux'):
|
||||
#noinspection PyUnresolvedReferences
|
||||
import Tkinter
|
||||
#noinspection PyUnresolvedReferences
|
||||
import tkMessageBox
|
||||
importRoot = Tkinter.Tk()
|
||||
importRoot.withdraw()
|
||||
tkMessageBox.showerror("KCC - Error", "Pillow 2.2.1 or newer is required!")
|
||||
tkMessageBox.showerror("KCC - Error", "Pillow 2.3.0 or newer is required!")
|
||||
exit(1)
|
||||
try:
|
||||
from PyQt4 import QtCore
|
||||
|
||||
12
kcc/image.py
12
kcc/image.py
@@ -25,27 +25,23 @@ from sys import platform
|
||||
try:
|
||||
# noinspection PyUnresolvedReferences
|
||||
from PIL import Image, ImageOps, ImageStat, ImageChops
|
||||
if tuple(map(int, ('2.2.1'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))):
|
||||
print "ERROR: Pillow 2.2.1 or newer is required!"
|
||||
if tuple(map(int, ('2.3.0'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))):
|
||||
print "ERROR: Pillow 2.3.0 or newer is required!"
|
||||
if platform.startswith('linux'):
|
||||
#noinspection PyUnresolvedReferences
|
||||
import Tkinter
|
||||
#noinspection PyUnresolvedReferences
|
||||
import tkMessageBox
|
||||
importRoot = Tkinter.Tk()
|
||||
importRoot.withdraw()
|
||||
tkMessageBox.showerror("KCC - Error", "Pillow 2.2.1 or newer is required!")
|
||||
tkMessageBox.showerror("KCC - Error", "Pillow 2.3.0 or newer is required!")
|
||||
exit(1)
|
||||
except ImportError:
|
||||
print "ERROR: Pillow is not installed!"
|
||||
if platform.startswith('linux'):
|
||||
#noinspection PyUnresolvedReferences
|
||||
import Tkinter
|
||||
#noinspection PyUnresolvedReferences
|
||||
import tkMessageBox
|
||||
importRoot = Tkinter.Tk()
|
||||
importRoot.withdraw()
|
||||
tkMessageBox.showerror("KCC - Error", "Pillow 2.2.1 or newer is required!")
|
||||
tkMessageBox.showerror("KCC - Error", "Pillow 2.3.0 or newer is required!")
|
||||
exit(1)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user