From a235a69d0c7482979e0d470b81143d8fbddbf3b4 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 15 May 2013 16:39:01 -0700 Subject: [PATCH] removed WebPGetFeatures_wrapper, as it's not used from python anymore --- _webp.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/_webp.c b/_webp.c index ec46fe317..83be7828b 100644 --- a/_webp.c +++ b/_webp.c @@ -5,36 +5,6 @@ #include -PyObject* WebPGetFeatures_wrapper(PyObject* self, PyObject* args) -{ - PyBytesObject *webp_string; - uint8_t* webp = NULL; - VP8StatusCode vp8_status_code = VP8_STATUS_OK; - Py_ssize_t size; - WebPBitstreamFeatures features; - - - if (!PyArg_ParseTuple(args, "S", &webp_string)) { - Py_RETURN_NONE; - } - - PyBytes_AsStringAndSize((PyObject *) webp_string, (char**)&webp, &size); - - vp8_status_code = WebPGetFeatures(webp, size, &features); - - if (vp8_status_code == VP8_STATUS_OK) { - printf("%i", features.has_alpha); - - } else { - // TODO: raise some sort of error - printf("Error occured checking webp file with code: %d\n", vp8_status_code); - Py_RETURN_NONE; - } - - return Py_BuildValue("b", features.has_alpha); -} - - PyObject* WebPEncodeRGB_wrapper(PyObject* self, PyObject* args) { PyBytesObject *rgb_string; @@ -171,7 +141,6 @@ PyObject* WebPDecoderBuggyAlpha_wrapper(PyObject* self, PyObject* args){ static PyMethodDef webpMethods[] = { - {"WebPGetFeatures", WebPGetFeatures_wrapper, METH_VARARGS, "WebPGetFeatures"}, {"WebPEncodeRGB", WebPEncodeRGB_wrapper, METH_VARARGS, "WebPEncodeRGB"}, {"WebPEncodeRGBA", WebPEncodeRGBA_wrapper, METH_VARARGS, "WebPEncodeRGBA"}, {"WebPDecode", WebPDecode_wrapper, METH_VARARGS, "WebPDecode"},