mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +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 mode: The requested mode. See: :ref:`concept-modes`.
|
||||||
:param matrix: An optional conversion matrix. If given, this
|
: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
|
:param dither: Dithering method, used when converting from
|
||||||
mode "RGB" to "P" or from "RGB" or "L" to "1".
|
mode "RGB" to "P" or from "RGB" or "L" to "1".
|
||||||
Available methods are NONE or FLOYDSTEINBERG (default).
|
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];
|
float m[12];
|
||||||
if (!PyArg_ParseTuple(args, "s(ffff)", &mode, m+0, m+1, m+2, m+3)) {
|
if (!PyArg_ParseTuple(args, "s(ffff)", &mode, m+0, m+1, m+2, m+3)) {
|
||||||
PyErr_Clear();
|
PyErr_Clear();
|
||||||
if (!PyArg_ParseTuple(args, "s(ffffffffffff)", &mode,
|
if (!PyArg_ParseTuple(args, "s(ffffffffffff)", &mode,
|
||||||
m+0, m+1, m+2, m+3,
|
m+0, m+1, m+2, m+3,
|
||||||
m+4, m+5, m+6, m+7,
|
m+4, m+5, m+6, m+7,
|
||||||
m+8, m+9, m+10, m+11))
|
m+8, m+9, m+10, m+11)){
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return PyImagingNew(ImagingConvertMatrix(self->image, mode, m));
|
return PyImagingNew(ImagingConvertMatrix(self->image, mode, m));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user