mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-30 20:06:17 +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
|
resample = NEAREST
|
||||||
|
|
||||||
if self.mode in ["LA", "RGBA"]:
|
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)
|
im = im.resize(size, resample, box)
|
||||||
return im.convert(self.mode)
|
return im.convert(self.mode)
|
||||||
|
|
||||||
|
@ -1963,7 +1963,7 @@ class Image:
|
||||||
return self.copy()
|
return self.copy()
|
||||||
|
|
||||||
if self.mode in ["LA", "RGBA"]:
|
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)
|
im = im.reduce(factor, box)
|
||||||
return im.convert(self.mode)
|
return im.convert(self.mode)
|
||||||
|
|
||||||
|
@ -2398,7 +2398,7 @@ class Image:
|
||||||
|
|
||||||
if self.mode in ("LA", "RGBA"):
|
if self.mode in ("LA", "RGBA"):
|
||||||
return (
|
return (
|
||||||
self.convert(self.mode.replace("A", "a"))
|
self.convert({"LA": "La", "RGBA": "RGBa"}[self.mode])
|
||||||
.transform(size, method, data, resample, fill, fillcolor)
|
.transform(size, method, data, resample, fill, fillcolor)
|
||||||
.convert(self.mode)
|
.convert(self.mode)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user