| Server IP : 3.111.61.48 / Your IP : 216.73.216.67 Web Server : Apache System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.2.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/PIL/__pycache__/ |
Upload File : |
o
Z#�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 sP || _ d | _|p
t� | _d | _|dkr$t�dt� |t| j�kr&t d��d S d S )Nr zOThe size parameter is deprecated and will be removed in Pillow 10 (2023-07-01).zwrong palette size)
�mode�rawmode� bytearray�palette�dirty�warnings�warn�DeprecationWarning�len�
ValueError)�selfr r �size� r �2/usr/lib/python3/dist-packages/PIL/ImagePalette.py�__init__'