mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 10:56:18 +03:00
Do not edit text of mode strings
This commit is contained in:
parent
8206f14419
commit
e437a8f981
|
@ -1913,7 +1913,7 @@ class Image:
|
|||
resample = NEAREST
|
||||
|
||||
if self.mode in ["LA", "RGBA"]:
|
||||
im = self.convert(self.mode[:-1] + "a")
|
||||
im = self.convert({"LA": "La", "RGBA": "RGBa"}[self.mode])
|
||||
im = im.resize(size, resample, box)
|
||||
return im.convert(self.mode)
|
||||
|
||||
|
@ -1963,7 +1963,7 @@ class Image:
|
|||
return self.copy()
|
||||
|
||||
if self.mode in ["LA", "RGBA"]:
|
||||
im = self.convert(self.mode[:-1] + "a")
|
||||
im = self.convert({"LA": "La", "RGBA": "RGBa"}[self.mode])
|
||||
im = im.reduce(factor, box)
|
||||
return im.convert(self.mode)
|
||||
|
||||
|
@ -2398,7 +2398,7 @@ class Image:
|
|||
|
||||
if self.mode in ("LA", "RGBA"):
|
||||
return (
|
||||
self.convert(self.mode.replace("A", "a"))
|
||||
self.convert({"LA": "La", "RGBA": "RGBa"}[self.mode])
|
||||
.transform(size, method, data, resample, fill, fillcolor)
|
||||
.convert(self.mode)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user