mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
make im.stretch strong alias to im.resize.
mark im.stretch as deprecated.
This commit is contained in:
parent
6078e6e1a7
commit
41029f0149
23
_imaging.c
23
_imaging.c
|
@ -1626,25 +1626,6 @@ im_setmode(ImagingObject* self, PyObject* args)
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
_stretch(ImagingObject* self, PyObject* args)
|
||||
{
|
||||
Imaging imIn, imOut;
|
||||
|
||||
int xsize, ysize;
|
||||
int filter = IMAGING_TRANSFORM_NEAREST;
|
||||
if (!PyArg_ParseTuple(args, "(ii)|i", &xsize, &ysize, &filter))
|
||||
return NULL;
|
||||
|
||||
imIn = self->image;
|
||||
|
||||
imOut = ImagingStretch(imIn, xsize, ysize, filter);
|
||||
if ( ! imOut) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return PyImagingNew(imOut);
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
_transform2(ImagingObject* self, PyObject* args)
|
||||
|
@ -3026,8 +3007,10 @@ static struct PyMethodDef methods[] = {
|
|||
{"rankfilter", (PyCFunction)_rankfilter, 1},
|
||||
#endif
|
||||
{"resize", (PyCFunction)_resize, 1},
|
||||
// There was two methods for image resize before.
|
||||
// Starting from 2.7 stretch is obsolete.
|
||||
{"stretch", (PyCFunction)_resize, 1},
|
||||
{"rotate", (PyCFunction)_rotate, 1},
|
||||
{"stretch", (PyCFunction)_stretch, 1},
|
||||
{"transpose", (PyCFunction)_transpose, 1},
|
||||
{"transform2", (PyCFunction)_transform2, 1},
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user