| 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 Z ddlmZmZmZmZ ddlmZ dZ dd� Z dd � Z
d
d� Zdd
� Zdd� Z
e e
eee
gZ G dd� d�ZG dd� de�ZdS )z�
Stuff to translate curve segments to palette values (derived from
the corresponding code in GIMP, written by Federico Mena Quintero.
See the GIMP distribution for more information.)
� )�log�pi�sin�sqrt� )�o8g�����|�=c C sL || kr| t k r
dS d| | S || }d| } | t k rdS dd| | S )Ng � �?� �?)�EPSILON��middle�pos� r �6/usr/lib/python3/dist-packages/PIL/GimpGradientFile.py�linear s r c C s |t d�t t| t�� S )Nr )r �maxr
r r r r �curved. � r c C s$ t t d tt| |� �d d S )Ng @r )r r r r r r r �sine2 s $r c C s t dt| |�d d �S �Nr � �r r r r r r �sphere_increasing6 r r c C s dt dt| |�d � S r r r r r r �sphere_decreasing: r r c @ s e Zd ZdZddd�ZdS )�GradientFileN� c C sp g }d}| j | \}}}}}} t|�D ]�}
|
|d }||k r2|d7 }| j | \}}}}}} ||k s|| }|tk r@| dd�}
n
| || | || | �}
ttd|d |d |
|d d ��}ttd|d |d |
|d d ��}ttd|d |d |
|d d ��}ttd|d |d |
|d d ��}|�|| | | � qd�|�dfS ) Nr r r � r � � �RGBA)�gradient�ranger
r �int�append�join)�self�entries�palette�ix�x0�x1�xm�rgb0�rgb1�segment�i�x�w�scale�r�g�b�ar r r �
getpaletteF s&