%PDF- %PDF-
Direktori : /lib/python3/dist-packages/PIL/__pycache__/ |
Current File : //lib/python3/dist-packages/PIL/__pycache__/ImagePalette.cpython-312.pyc |
� ��eS � �| � d dl mZ d dlZddlmZmZmZmZ G d� d� Zd� Z d� Z d � Zdd �Zdd�Z dd�Zdd �Zd� Zy)� )�annotationsN� )�GimpGradientFile�GimpPaletteFile� ImageColor�PaletteFilec � � e Zd ZdZdd�Zed� � Zej d� � Zed� � Zej d� � Zd� Z d � Z d � ZeZdd�Z dd�Zd � Zy)�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. Nc �T � || _ d | _ |xs t � | _ d | _ y �N)�mode�rawmode� bytearray�palette�dirty)�selfr r s �2/usr/lib/python3/dist-packages/PIL/ImagePalette.py�__init__zImagePalette.__init__% s% � ��� �����-�)�+����� � c � � | j S r )�_palette�r s r r zImagePalette.palette+ s � ��}�}�r c � � d | _ || _ y r )�_colorsr )r r s r r zImagePalette.palette/ s � ������ r c �, � | j �}t | j � }i | _ t dt | j � |� D ]>