Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
ImageTransform.cpython-313.pyc80 linesDownload Raw Back to __pycache__
1�

2v�j�����SSKJr SSKJr SSKJr SSKJr "SS\R5r	"SS	\	5r3"S4S\	5r"SS
\	5r"SS\	5r
"SS\	5rg)�)�annotations)�Sequence)�Any�)�Imagec�R�\rSrSr%SrS\S'S5SjrSSjrSSjrSr	g	)
�	Transform�zIBase class for other transforms defined in :py:mod:`~PIL.ImageTransform`.zImage.Transform�methodc��Xlg�N��data)�selfrs  �XD:\code\apps\devtools\python\user_packages\Python313\site-packages\PIL/ImageTransform.py�__init__�Transform.__init__s���	�c�2�URUR4$r
)rr)rs r�getdata�Transform.getdatas���{�{�D�I�I�%�%rc�N�UR5upEUR"XU40UD6$)z?Perform the transform. Called from :py:meth:`.Image.transform`.)r�	transform)r�size�image�optionsrrs      rr�Transform.transform"s'���|�|�~������t�T�=�W�=�=rrN)rz
Sequence[Any]�return�None)rz%tuple[Image.Transform, Sequence[int]])rztuple[int, int]r�Image.Imagerrrr )6�__name__�7__module__�__qualname__�__firstlineno__�__doc__�__annotations__rrr�__static_attributes__�rrr	r	s@��S����&�	>��	>��	>��		>�89�	>rr	c�D�\rSrSrSr\RRrSr	g)�AffineTransform�.a;10Define an affine image transform.11 12This function takes a 6-tuple (a, b, c, d, e, f) which contain the first13two rows from the inverse of an affine transform matrix. For each pixel14(x, y) in the output image, the new value is taken from a position (a x +15b y + c, d x + e y + f) in the input image, rounded to nearest pixel.16 17This function can be used to scale, translate, rotate, and shear the18original image.19 20See :py:meth:`.Image.transform`21 22:param matrix: A 6-tuple (a, b, c, d, e, f) containing the first two rows23    from the inverse of an affine transform matrix.24r(N)25r!r"r#r$r%rr	�AFFINErr'r(rrr*r*.s���"�_�_�
#�
#�Frr*c�D�\rSrSrSr\RRrSr	g)�PerspectiveTransform�Ca�26Define a perspective image transform.27 28This function takes an 8-tuple (a, b, c, d, e, f, g, h). For each pixel29(x, y) in the output image, the new value is taken from a position30((a x + b y + c) / (g x + h y + 1), (d x + e y + f) / (g x + h y + 1)) in31the input image, rounded to nearest pixel.32 33This function can be used to scale, translate, rotate, and shear the34original image.35 36See :py:meth:`.Image.transform`37 38:param matrix: An 8-tuple (a, b, c, d, e, f, g, h).39r(N)40r!r"r#r$r%rr	�PERSPECTIVErr'r(rrr.r.Cs��� �_�_�
(�
(�Frr.c�D�\rSrSrSr\RRrSr	g)�ExtentTransform�Wa�41Define a transform to extract a subregion from an image.42 43Maps a rectangle (defined by two corners) from the image to a rectangle of44the given size. The resulting image will contain data sampled from between45the corners, such that (x0, y0) in the input image will end up at (0,0) in46the output image, and (x1, y1) at size.47 48This method can be used to crop, stretch, shrink, or mirror an arbitrary49rectangle in the current image. It is slightly slower than crop, but about50as fast as a corresponding resize operation.51 52See :py:meth:`.Image.transform`53 54:param bbox: A 4-tuple (x0, y0, x1, y1) which specifies two points in the55    input image's coordinate system. See :ref:`coordinate-system`.56r(N)57r!r"r#r$r%rr	�EXTENTrr'r(rrr2r2Ws���$�_�_�
#�
#�Frr2c�D�\rSrSrSr\RRrSr	g)�
QuadTransform�maV58Define a quad image transform.59 60Maps a quadrilateral (a region defined by four corners) from the image to a61rectangle of the given size.62 63See :py:meth:`.Image.transform`64 65:param xy: An 8-tuple (x0, y0, x1, y1, x2, y2, x3, y3) which contain the66    upper left, lower left, lower right, and upper right corner of the67    source quadrilateral.68r(N)69r!r"r#r$r%rr	�QUADrr'r(rrr6r6ms����_�_�
!�
!�Frr6c�D�\rSrSrSr\RRrSr	g)�
MeshTransform�~z�70Define a mesh image transform.  A mesh transform consists of one or more71individual quad transforms.72 73See :py:meth:`.Image.transform`74 75:param data: A list of (bbox, quad) tuples.76r(N)77r!r"r#r$r%rr	�MESHrr'r(rrr:r:~s����_�_�
!�
!�Frr:N)�78__future__r�collections.abcr�typingr�r�ImageTransformHandlerr	r*r.r2r6r:r(rr�<module>rBsa��#�$���>��+�+�>�.$�i�$�*)�9�)�($�i�$�,"�I�"�"79"�I�80"r
codekingpro/portable-devtools · Team Ai