mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-23 15:20:33 +03:00
Simplify Python code by receiving tuple from C
This commit is contained in:
parent
b57b4e5f2c
commit
b59dea60a6
|
@ -46,8 +46,7 @@ class WebPImageFile(ImageFile.ImageFile):
|
||||||
self._decoder = _webp.WebPAnimDecoder(self.fp.read())
|
self._decoder = _webp.WebPAnimDecoder(self.fp.read())
|
||||||
|
|
||||||
# Get info from decoder
|
# Get info from decoder
|
||||||
width, height, loop_count, bgcolor, frame_count, mode = self._decoder.get_info()
|
self._size, loop_count, bgcolor, frame_count, mode = self._decoder.get_info()
|
||||||
self._size = width, height
|
|
||||||
self.info["loop"] = loop_count
|
self.info["loop"] = loop_count
|
||||||
bg_a, bg_r, bg_g, bg_b = (
|
bg_a, bg_r, bg_g, bg_b = (
|
||||||
(bgcolor >> 24) & 0xFF,
|
(bgcolor >> 24) & 0xFF,
|
||||||
|
|
|
@ -449,7 +449,7 @@ _anim_decoder_get_info(PyObject *self) {
|
||||||
WebPAnimInfo *info = &(decp->info);
|
WebPAnimInfo *info = &(decp->info);
|
||||||
|
|
||||||
return Py_BuildValue(
|
return Py_BuildValue(
|
||||||
"IIIIIs",
|
"(II)IIIs",
|
||||||
info->canvas_width,
|
info->canvas_width,
|
||||||
info->canvas_height,
|
info->canvas_height,
|
||||||
info->loop_count,
|
info->loop_count,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user