mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-10-29 15:07:44 +03:00
Removed _expand()
This commit is contained in:
parent
d42e537efe
commit
e2a8e217da
|
|
@ -284,33 +284,6 @@ class TestImage:
|
||||||
assert item is not None
|
assert item is not None
|
||||||
assert item != num
|
assert item != num
|
||||||
|
|
||||||
def test_expand_x(self) -> None:
|
|
||||||
# Arrange
|
|
||||||
im = hopper()
|
|
||||||
orig_size = im.size
|
|
||||||
xmargin = 5
|
|
||||||
|
|
||||||
# Act
|
|
||||||
im = im._expand(xmargin)
|
|
||||||
|
|
||||||
# Assert
|
|
||||||
assert im.size[0] == orig_size[0] + 2 * xmargin
|
|
||||||
assert im.size[1] == orig_size[1] + 2 * xmargin
|
|
||||||
|
|
||||||
def test_expand_xy(self) -> None:
|
|
||||||
# Arrange
|
|
||||||
im = hopper()
|
|
||||||
orig_size = im.size
|
|
||||||
xmargin = 5
|
|
||||||
ymargin = 3
|
|
||||||
|
|
||||||
# Act
|
|
||||||
im = im._expand(xmargin, ymargin)
|
|
||||||
|
|
||||||
# Assert
|
|
||||||
assert im.size[0] == orig_size[0] + 2 * xmargin
|
|
||||||
assert im.size[1] == orig_size[1] + 2 * ymargin
|
|
||||||
|
|
||||||
def test_getbands(self) -> None:
|
def test_getbands(self) -> None:
|
||||||
# Assert
|
# Assert
|
||||||
assert hopper("RGB").getbands() == ("R", "G", "B")
|
assert hopper("RGB").getbands() == ("R", "G", "B")
|
||||||
|
|
|
||||||
|
|
@ -1336,12 +1336,6 @@ class Image:
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def _expand(self, xmargin: int, ymargin: int | None = None) -> Image:
|
|
||||||
if ymargin is None:
|
|
||||||
ymargin = xmargin
|
|
||||||
self.load()
|
|
||||||
return self._new(self.im.expand(xmargin, ymargin))
|
|
||||||
|
|
||||||
def filter(self, filter: ImageFilter.Filter | type[ImageFilter.Filter]) -> Image:
|
def filter(self, filter: ImageFilter.Filter | type[ImageFilter.Filter]) -> Image:
|
||||||
"""
|
"""
|
||||||
Filters this image using the given filter. For a list of
|
Filters this image using the given filter. For a list of
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user