| Server IP : 54.37.205.81 / Your IP : 216.73.216.76 Web Server : nginx/1.22.1 System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64 User : debian ( 1000) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/PIL/__pycache__/ |
Upload File : |
�
�"�c� � � � d dl Z ddlmZmZmZmZ ddlmZ G d� d� � Zd� Z d� Z
d � Zdd�Zdd�Z
dd�Zdd�Zd� ZdS )� N� )�GimpGradientFile�GimpPaletteFile�
ImageColor�PaletteFile)� deprecatec � � e Zd ZdZdd�Zed� � � Zej d� � � Zed� � � Zej d � � � Zd
� Z d� Z
d� ZeZdd
�Z
d� ZdS )�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.
�RGBNr c �� � || _ d | _ |p
t � � | _ d | _ |dk r:t ddd � � |t
| j � � k rd}t |� � �d S d S )Nr zThe size parameter�
zwrong palette size)�mode�rawmode� bytearray�palette�dirtyr �len�
ValueError)�selfr r �size�msgs �2/usr/lib/python3/dist-packages/PIL/ImagePalette.py�__init__zImagePalette.__init__% sv � ��� �����-�)�+�+�����
��1�9�9��*�B��5�5�5��s�4�<�(�(�(�(�*�� ��o�o�%� �9�(�(� c � � | j S �N)�_palette�r s r r zImagePalette.palette0 s
� ��}�r c �"