mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-15 06:07:33 +03:00
Move new_block to module
This commit is contained in:
parent
934ae12ed5
commit
d29fa73ea6
|
@ -178,7 +178,7 @@ class PhotoImage:
|
||||||
if image.isblock() and im.mode == self.__mode:
|
if image.isblock() and im.mode == self.__mode:
|
||||||
block = image
|
block = image
|
||||||
else:
|
else:
|
||||||
block = image.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, image) # convert directly between buffers
|
||||||
|
|
||||||
_pyimagingtkcall("PyImagingPhoto", self.__photo, block.ptr)
|
_pyimagingtkcall("PyImagingPhoto", self.__photo, block.ptr)
|
||||||
|
|
|
@ -3674,15 +3674,12 @@ static struct PyMethodDef methods[] = {
|
||||||
/* Unsharpmask extension */
|
/* Unsharpmask extension */
|
||||||
{"gaussian_blur", (PyCFunction)_gaussian_blur, METH_VARARGS},
|
{"gaussian_blur", (PyCFunction)_gaussian_blur, METH_VARARGS},
|
||||||
{"unsharp_mask", (PyCFunction)_unsharp_mask, METH_VARARGS},
|
{"unsharp_mask", (PyCFunction)_unsharp_mask, METH_VARARGS},
|
||||||
|
|
||||||
{"box_blur", (PyCFunction)_box_blur, METH_VARARGS},
|
{"box_blur", (PyCFunction)_box_blur, METH_VARARGS},
|
||||||
|
|
||||||
/* Special effects */
|
/* Special effects */
|
||||||
{"effect_spread", (PyCFunction)_effect_spread, METH_VARARGS},
|
{"effect_spread", (PyCFunction)_effect_spread, METH_VARARGS},
|
||||||
|
|
||||||
/* Misc. */
|
/* Misc. */
|
||||||
{"new_block", (PyCFunction)_new_block, METH_VARARGS},
|
|
||||||
|
|
||||||
{"save_ppm", (PyCFunction)_save_ppm, METH_VARARGS},
|
{"save_ppm", (PyCFunction)_save_ppm, METH_VARARGS},
|
||||||
|
|
||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
|
@ -4212,6 +4209,7 @@ static PyMethodDef functions[] = {
|
||||||
{"blend", (PyCFunction)_blend, METH_VARARGS},
|
{"blend", (PyCFunction)_blend, METH_VARARGS},
|
||||||
{"fill", (PyCFunction)_fill, METH_VARARGS},
|
{"fill", (PyCFunction)_fill, METH_VARARGS},
|
||||||
{"new", (PyCFunction)_new, METH_VARARGS},
|
{"new", (PyCFunction)_new, METH_VARARGS},
|
||||||
|
{"new_block", (PyCFunction)_new_block, METH_VARARGS},
|
||||||
{"merge", (PyCFunction)_merge, METH_VARARGS},
|
{"merge", (PyCFunction)_merge, METH_VARARGS},
|
||||||
|
|
||||||
/* Functions */
|
/* Functions */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user