⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
PIL
/
__pycache__
/
View File Name :
ImagePalette.cpython-310.pyc
o Z#a @ s d dl Z d dlZddlmZmZmZmZ G dd dZdd Zdd Z d d Z dd dZdddZdddZ dddZdd ZdS ) N )GimpGradientFileGimpPaletteFile ImageColorPaletteFilec @ sb e Zd ZdZdddZedd Zejd d Zd d Zdd Z dd Z e ZdddZdd 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$tdt |t| jkr&t dd S d S )Nr zOThe size parameter is deprecated and will be removed in Pillow 10 (2023-07-01).zwrong palette size) moderawmode bytearraypalettedirtywarningswarnDeprecationWarninglen ValueError)selfr r size r 2/usr/lib/python3/dist-packages/PIL/ImagePalette.py__init__' s zImagePalette.__init__c C s | j S N)_paletter r r r r 5 s zImagePalette.palettec C sb || _ t| j}i | _tdt| j|D ]}t| j||| }|| jv r'q|| | j|<