mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-15 06:07:33 +03:00
Correct types of _imaging methods
Move new_block method to _imaging remove _imaging.convert method
This commit is contained in:
parent
8ba076ae86
commit
50dd94664b
|
@ -181,7 +181,7 @@ class PhotoImage:
|
||||||
image = im.im
|
image = im.im
|
||||||
if not image.isblock() or im.mode != self.__mode:
|
if not image.isblock() or im.mode != self.__mode:
|
||||||
block = Image.core.new_block(self.__mode, im.size)
|
block = Image.core.new_block(self.__mode, im.size)
|
||||||
image.convert2(block, image) # convert directly between buffers
|
image.convert2(block) # convert directly between buffers
|
||||||
ptr = block.ptr
|
ptr = block.ptr
|
||||||
|
|
||||||
_pyimagingtkcall("PyImagingPhoto", self.__photo, ptr)
|
_pyimagingtkcall("PyImagingPhoto", self.__photo, ptr)
|
||||||
|
|
|
@ -688,7 +688,7 @@ _radial_gradient(PyObject *self, PyObject *args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_alpha_composite(ImagingObject *self, PyObject *args) {
|
_alpha_composite(PyObject *self, PyObject *args) {
|
||||||
ImagingObject *imagep1;
|
ImagingObject *imagep1;
|
||||||
ImagingObject *imagep2;
|
ImagingObject *imagep2;
|
||||||
|
|
||||||
|
@ -702,7 +702,7 @@ _alpha_composite(ImagingObject *self, PyObject *args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_blend(ImagingObject *self, PyObject *args) {
|
_blend(PyObject *self, PyObject *args) {
|
||||||
ImagingObject *imagep1;
|
ImagingObject *imagep1;
|
||||||
ImagingObject *imagep2;
|
ImagingObject *imagep2;
|
||||||
double alpha;
|
double alpha;
|
||||||
|
@ -920,15 +920,12 @@ _convert(ImagingObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_convert2(ImagingObject *self, PyObject *args) {
|
_convert2(ImagingObject *self, PyObject *args) {
|
||||||
ImagingObject *imagep1;
|
ImagingObject *imagep;
|
||||||
ImagingObject *imagep2;
|
if (!PyArg_ParseTuple(args, "O!", &Imaging_Type, &imagep)) {
|
||||||
if (!PyArg_ParseTuple(
|
|
||||||
args, "O!O!", &Imaging_Type, &imagep1, &Imaging_Type, &imagep2
|
|
||||||
)) {
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ImagingConvert2(imagep1->image, imagep2->image)) {
|
if (!ImagingConvert2(imagep->image, self->image)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4162,9 +4159,6 @@ static PyMethodDef functions[] = {
|
||||||
{"new_block", (PyCFunction)_new_block, METH_VARARGS},
|
{"new_block", (PyCFunction)_new_block, METH_VARARGS},
|
||||||
{"merge", (PyCFunction)_merge, METH_VARARGS},
|
{"merge", (PyCFunction)_merge, METH_VARARGS},
|
||||||
|
|
||||||
/* Functions */
|
|
||||||
{"convert", (PyCFunction)_convert2, METH_VARARGS},
|
|
||||||
|
|
||||||
/* Codecs */
|
/* Codecs */
|
||||||
{"bcn_decoder", (PyCFunction)PyImaging_BcnDecoderNew, METH_VARARGS},
|
{"bcn_decoder", (PyCFunction)PyImaging_BcnDecoderNew, METH_VARARGS},
|
||||||
{"bit_decoder", (PyCFunction)PyImaging_BitDecoderNew, METH_VARARGS},
|
{"bit_decoder", (PyCFunction)PyImaging_BitDecoderNew, METH_VARARGS},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user