| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/PIL/__pycache__/ |
Upload File : |
a
h�a� � @ s� d dl Z d dlZddlmZmZmZmZ G dd� d�Zdd� Zdd � Z d
d� Z
dd
d�Zddd�Zddd�Z
ddd�Zdd� ZdS )� N� )�GimpGradientFile�GimpPaletteFile�
ImageColor�PaletteFilec @ sb e Zd ZdZddd�Zedd� �Zejd d� �Zd
d� Zdd
� Z dd� Z
e
Zddd�Zdd� Z
dS )�ImagePalettea
Color palette for palette mapped images
:param mode: The mode to use for the palette. See:
:ref:`concept-modes`. Defaults to "RGB"
:param palette: An optional palette. If given, it must be a bytearray,
an array or a list of ints between 0-255. The list must consist of
all channels for one color followed by the next color (e.g. RGBRGBRGB).
Defaults to an empty palette.
:param size: An optional palette size. If given, an error is raised
if ``palette`` is not of equal length.
�RGBNr c C sL || _ d | _|pt� | _d | _|dkrHt�dt� |t| j�krHt d��d S )Nr zOThe size parameter is deprecated and will be removed in Pillow 10 (2023-01-02).zwrong palette size)
�mode�rawmode� bytearray�palette�dirty�warnings�warn�DeprecationWarning�len�
ValueError)�selfr r �size� r �4/usr/lib/python3.9/site-packages/PIL/ImagePalette.py�__init__'