From baea664477d97aecc802b5ba46fed55e4524dd91 Mon Sep 17 00:00:00 2001 From: hugovk Date: Fri, 16 Oct 2015 18:12:22 +0300 Subject: [PATCH 1/3] Remove _imagingtiff.c stuff --- setup.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup.py b/setup.py index 101fecd5e..e05207c0d 100644 --- a/setup.py +++ b/setup.py @@ -554,10 +554,6 @@ class pil_build_ext(build_ext): exts.append(Extension( "PIL._imagingft", ["_imagingft.c"], libraries=["freetype"])) - if os.path.isfile("_imagingtiff.c") and feature.tiff: - exts.append(Extension( - "PIL._imagingtiff", ["_imagingtiff.c"], libraries=["tiff"])) - if os.path.isfile("_imagingcms.c") and feature.lcms: extra = [] if sys.platform == "win32": From 7f83226e368723ef6dbd59af2b2f11bece1e6607 Mon Sep 17 00:00:00 2001 From: hugovk Date: Fri, 16 Oct 2015 19:48:01 +0300 Subject: [PATCH 2/3] Remove old, closed-source PIL Plus extensions --- _imaging.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/_imaging.c b/_imaging.c index 8d7e01685..3a305885c 100644 --- a/_imaging.c +++ b/_imaging.c @@ -98,9 +98,6 @@ #define WITH_DEBUG /* extra debugging interfaces */ -/* PIL Plus extensions */ -#undef WITH_CRACKCODE /* pil plus */ - #undef VERBOSE #define CLIP(x) ((x) <= 0 ? 0 : (x) < 256 ? (x) : 255) @@ -370,7 +367,7 @@ getlist(PyObject* arg, int* length, const char* wrong_length, int type) void* list; PyObject* seq; PyObject* op; - + if (!PySequence_Check(arg)) { PyErr_SetString(PyExc_TypeError, must_be_sequence); return NULL; @@ -392,7 +389,7 @@ getlist(PyObject* arg, int* length, const char* wrong_length, int type) PyErr_SetString(PyExc_TypeError, must_be_sequence); return NULL; } - + for (i = 0; i < n; i++) { op = PySequence_Fast_GET_ITEM(seq, i); // DRY, branch prediction is going to work _really_ well @@ -3030,9 +3027,6 @@ static struct PyMethodDef methods[] = { {"convert_transparent", (PyCFunction)_convert_transparent, 1}, {"copy", (PyCFunction)_copy, 1}, {"copy2", (PyCFunction)_copy2, 1}, -#ifdef WITH_CRACKCODE - {"crackcode", (PyCFunction)_crackcode, 1}, -#endif {"crop", (PyCFunction)_crop, 1}, {"expand", (PyCFunction)_expand_image, 1}, {"filter", (PyCFunction)_filter, 1}, From bba30f736b6551774a5fcfa58784723a41ccd23d Mon Sep 17 00:00:00 2001 From: wiredfool Date: Sat, 24 Oct 2015 14:23:24 +0100 Subject: [PATCH 3/3] Removed more closed source PIL plus --- PIL/ImageGrab.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/PIL/ImageGrab.py b/PIL/ImageGrab.py index c52189145..c1306d611 100644 --- a/PIL/ImageGrab.py +++ b/PIL/ImageGrab.py @@ -22,13 +22,7 @@ if sys.platform not in ["win32", "darwin"]: raise ImportError("ImageGrab is OS X and Windows only") if sys.platform == "win32": - try: - # built-in driver (1.1.3 and later) - grabber = Image.core.grabscreen - except AttributeError: - # stand-alone driver (pil plus) - import _grabscreen - grabber = _grabscreen.grab + grabber = Image.core.grabscreen elif sys.platform == "darwin": import os import tempfile