mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Clarify variable names in Image
Co-authored-by: Yay295 <Yay295@users.noreply.github.com>
This commit is contained in:
parent
f52bbf8950
commit
b6b72170a8
|
@ -767,12 +767,12 @@ class Image:
|
|||
|
||||
data = []
|
||||
while True:
|
||||
l, s, d = e.encode(bufsize)
|
||||
data.append(d)
|
||||
if s:
|
||||
length, error_code, chunk = e.encode(bufsize)
|
||||
data.append(chunk)
|
||||
if error_code:
|
||||
break
|
||||
if s < 0:
|
||||
msg = f"encoder error {s} in tobytes"
|
||||
if error_code < 0:
|
||||
msg = f"encoder error {error_code} in tobytes"
|
||||
raise RuntimeError(msg)
|
||||
|
||||
return b"".join(data)
|
||||
|
|
Loading…
Reference in New Issue
Block a user