Skip to content

Commit

Permalink
Move new_block to module
Browse files Browse the repository at this point in the history
  • Loading branch information
homm committed Sep 8, 2024
1 parent 934ae12 commit d29fa73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/PIL/ImageTk.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def paste(self, im: Image.Image) -> None:
if image.isblock() and im.mode == self.__mode:
block = image
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

_pyimagingtkcall("PyImagingPhoto", self.__photo, block.ptr)
Expand Down
4 changes: 1 addition & 3 deletions src/_imaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -3674,15 +3674,12 @@ static struct PyMethodDef methods[] = {
/* Unsharpmask extension */
{"gaussian_blur", (PyCFunction)_gaussian_blur, METH_VARARGS},
{"unsharp_mask", (PyCFunction)_unsharp_mask, METH_VARARGS},

{"box_blur", (PyCFunction)_box_blur, METH_VARARGS},

/* Special effects */
{"effect_spread", (PyCFunction)_effect_spread, METH_VARARGS},

/* Misc. */
{"new_block", (PyCFunction)_new_block, METH_VARARGS},

{"save_ppm", (PyCFunction)_save_ppm, METH_VARARGS},

{NULL, NULL} /* sentinel */
Expand Down Expand Up @@ -4212,6 +4209,7 @@ static PyMethodDef functions[] = {
{"blend", (PyCFunction)_blend, METH_VARARGS},
{"fill", (PyCFunction)_fill, METH_VARARGS},
{"new", (PyCFunction)_new, METH_VARARGS},
{"new_block", (PyCFunction)_new_block, METH_VARARGS},
{"merge", (PyCFunction)_merge, METH_VARARGS},

/* Functions */
Expand Down

0 comments on commit d29fa73

Please sign in to comment.