CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
GribStubImagePlugin.cpython-310.pyc25 linesDownload Raw Back to __pycache__
1o

2��YiN�@s�ddlmZddlZddlmZddlmZmZdadd3d�Z	ddd�Z4Gdd�dej�Zddd�Z
e�ejee5�e�eje
�e�ejd�dS)�)�annotationsN)�IO�)�Image�	ImageFile�handler�ImageFile.StubHandler | None�return�NonecCs|adS)z_6    Install application-specific GRIB image handler.7 8    :param handler: Handler object.9    N��_handler)r�r
��E:\DocsHouse\542 percep lab latest\PerceptionLab\PerceptionLab_Portable\python_embed\Lib\site-packages\PIL/GribStubImagePlugin.py�register_handlersr�prefix�bytes�boolcCs"t|�dko|�d�o|ddkS)N�sGRIB�r)�len�10startswith)rr
r
r�_accept#s"rc@s(eZdZdZdZd11dd�Zddd�Zd	S)�GribStubImageFileZGRIBr	r12cCsd|jdusJ�t|j�d��sd}t|��|j�dtj�d|_d|_|�	�}|r0|�13|�dSdS)NrzNot a GRIB filei�����F)rr)�fpr�read�SyntaxError�seek�os�SEEK_CUR�_mode�_size�_load�open)�self�msg�loaderr
r
r�_open+s�zGribStubImageFile._openrcCstS)Nr)r$r
r
rr";szGribStubImageFile._loadN)r	r14)r	r)�__name__�15__module__�__qualname__�format�format_descriptionr'r"r
r
r
rr's1617r�im�Image.Imager�	IO[bytes]�filename�str | bytescCs0tdus	ttd�sd}t|��t�|||�dS)N�savezGRIB save handler not installed)r�hasattr�OSErrorr2)r-rr0r%r
r
r�_save?sr5z.grib)rrr	r18)rrr	r)r-r.rr/r0r1r	r19)�20__future__rr�typingr�rrrrrZ
StubImageFilerr5Z
register_openr+Z
register_saveZregister_extensionr
r
r
r�<module>s2122232425
Aluode/PerceptionLabPortable · CoolFace