mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Merge pull request #1426 from wiredfool/convert-matrix-docs
Correct convert matrix docs
This commit is contained in:
commit
18f5e5e123
|
@ -822,7 +822,7 @@ class Image(object):
|
|||
|
||||
:param mode: The requested mode. See: :ref:`concept-modes`.
|
||||
:param matrix: An optional conversion matrix. If given, this
|
||||
should be 4- or 16-tuple containing floating point values.
|
||||
should be 4- or 12-tuple containing floating point values.
|
||||
:param dither: Dithering method, used when converting from
|
||||
mode "RGB" to "P" or from "RGB" or "L" to "1".
|
||||
Available methods are NONE or FLOYDSTEINBERG (default).
|
||||
|
|
11
_imaging.c
11
_imaging.c
|
@ -768,11 +768,12 @@ _convert_matrix(ImagingObject* self, PyObject* args)
|
|||
float m[12];
|
||||
if (!PyArg_ParseTuple(args, "s(ffff)", &mode, m+0, m+1, m+2, m+3)) {
|
||||
PyErr_Clear();
|
||||
if (!PyArg_ParseTuple(args, "s(ffffffffffff)", &mode,
|
||||
m+0, m+1, m+2, m+3,
|
||||
m+4, m+5, m+6, m+7,
|
||||
m+8, m+9, m+10, m+11))
|
||||
return NULL;
|
||||
if (!PyArg_ParseTuple(args, "s(ffffffffffff)", &mode,
|
||||
m+0, m+1, m+2, m+3,
|
||||
m+4, m+5, m+6, m+7,
|
||||
m+8, m+9, m+10, m+11)){
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return PyImagingNew(ImagingConvertMatrix(self->image, mode, m));
|
||||
|
|
Loading…
Reference in New Issue
Block a user