File: //lib/python3/dist-packages/PIL/__pycache__/WebPImagePlugin.cpython-38.pyc
U
g�
^+ � @ s� d dl mZ ddlmZmZ zddlmZ dZW n ek
rH dZY nX dddd�Zddd�Z d d
d
d�Z
dd
� ZG dd� dej�Zdd� Z
dd� Ze�ejee� er�e�eje� ejr�e�eje
� e�ejd� e�ejd� dS )� )�BytesIO� )�Image� ImageFile)�_webpTF)�RGBX�RGBA�RGB)r r r r )s VP8 s VP8Xs VP8Lc C sL | d d� dk}| dd� dk}| dd� t k}|rH|rH|rHtsDdS dS d S ) N� s RIFF� � s WEBP� zEimage file could not be identified because WEBP support not installedT)�_VP8_MODES_BY_IDENTIFIER� SUPPORTED)�prefixZis_riff_file_formatZis_webp_fileZis_valid_vp8_mode� r �5/usr/lib/python3/dist-packages/PIL/WebPImagePlugin.py�_accept s �r c s~ e Zd ZdZdZdd� Zdd� Zedd� �Zed d
� �Z � fdd�Z
ddd�Zdd� Zdd� Z
� fdd�Z� fdd�Z� ZS )�
WebPImageFileZWEBPz
WebP imagec C s� t jsvt �| j�� �\}}}| _}}|r2|| jd<