mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 16:22:22 +03:00
webp: minor cleanup
This commit is contained in:
parent
4af381c6ba
commit
3d5dd3b4fc
4
_webp.c
4
_webp.c
|
@ -136,7 +136,7 @@ PyObject* WebPEncode_wrapper(PyObject* self, PyObject* args)
|
||||||
PyObject* WebPDecode_wrapper(PyObject* self, PyObject* args)
|
PyObject* WebPDecode_wrapper(PyObject* self, PyObject* args)
|
||||||
{
|
{
|
||||||
PyBytesObject *webp_string;
|
PyBytesObject *webp_string;
|
||||||
uint8_t *webp;
|
const uint8_t *webp;
|
||||||
Py_ssize_t size;
|
Py_ssize_t size;
|
||||||
PyObject *ret, *bytes, *pymode, *icc_profile = Py_None, *exif = Py_None;
|
PyObject *ret, *bytes, *pymode, *icc_profile = Py_None, *exif = Py_None;
|
||||||
WebPDecoderConfig config;
|
WebPDecoderConfig config;
|
||||||
|
@ -174,7 +174,7 @@ PyObject* WebPDecode_wrapper(PyObject* self, PyObject* args)
|
||||||
|
|
||||||
WebPMux* mux = WebPMuxCreate(&data, copy_data);
|
WebPMux* mux = WebPMuxCreate(&data, copy_data);
|
||||||
WebPMuxGetFrame(mux, 1, &image);
|
WebPMuxGetFrame(mux, 1, &image);
|
||||||
webp = (uint8_t*)image.bitstream.bytes;
|
webp = image.bitstream.bytes;
|
||||||
size = image.bitstream.size;
|
size = image.bitstream.size;
|
||||||
|
|
||||||
vp8_status_code = WebPDecode(webp, size, &config);
|
vp8_status_code = WebPDecode(webp, size, &config);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user