
    ⨽g}                     x    d Z ddlZddlmZ ddlmZ  G d de      Z edd	d
d      Z ej                  e       y)zE Example plugin. You can use this as a template for your own plugin.
    N   )formats)Formatc                   p    e Zd ZdZd Zd Z G d dej                        Z G d dej                        Zy)	DummyFormata  The dummy format is an example format that does nothing.
    It will never indicate that it can read or write a file. When
    explicitly asked to read, it will simply read the bytes. When
    explicitly asked to write, it will raise an error.

    This documentation is shown when the user does ``help('thisformat')``.

    Parameters for reading
    ----------------------
    Specify arguments in numpy doc style here.

    Parameters for saving
    ---------------------
    Specify arguments in numpy doc style here.

    c                 6    |j                   | j                  v ryy NT	extension
extensionsselfrequests     `/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/imageio/plugins/example.py	_can_readzDummyFormat._can_read   s    , / 0    c                 6    |j                   | j                  v ryy r	   r
   r   s     r   
_can_writezDummyFormat._can_write8   s     / 0r   c                   ,    e Zd ZddZd Zd Zd Zd Zy)DummyFormat.Readerc                 ^    | j                   j                         | _        || _        d | _        y N)r   get_file_fp_length_data)r   some_optionlengths      r   _openzDummyFormat.Reader._openG   s&     ||,,.DH!DLDJr   c                      y r    r   s    r   _closezDummyFormat.Reader._closeS        r   c                     | j                   S r   )r   r"   s    r   _get_lengthzDummyFormat.Reader._get_lengthX   s    <<r   c                    || j                   k\  rt        d|| j                   fz        | j                  | j                  j	                         | _        t        j                  | j                  d      }t        |      df|_        |i fS )NzImage index %i > %iuint8   )	r   
IndexErrorr   r   readnp
frombufferlenshape)r   indexims      r   	_get_datazDummyFormat.Reader._get_data\   so    $ !6%9N!NOOzz!!XX]]_
tzz73B2wzBHr6Mr   c                     i S r   r!   )r   r0   s     r   _get_meta_dataz!DummyFormat.Reader._get_meta_datai   s	     Ir   N)Fr)   )__name__
__module____qualname__r   r#   r&   r2   r4   r!   r   r   Readerr   F   s    
		
	 		r   r8   c                   &    e Zd ZddZd Zd Zd Zy)DummyFormat.Writerc                 B    | j                   j                         | _        y r   )r   r   r   )r   flagss     r   r   zDummyFormat.Writer._openq   s     ||,,.DHr   c                      y r   r!   r"   s    r   r#   zDummyFormat.Writer._close{   r$   r   c                     t        d      )Nz)The dummy format cannot write image data.RuntimeError)r   r1   metas      r   _append_datazDummyFormat.Writer._append_data   s    JKKr   c                     t        d      )Nz(The dummy format cannot write meta data.r?   )r   rA   s     r   set_meta_dataz DummyFormat.Writer.set_meta_data   s     IJJr   N)r   )r5   r6   r7   r   r#   rB   rD   r!   r   r   Writerr:   p   s    	/	
	L	Kr   rE   N)	r5   r6   r7   __doc__r   r   r   r8   rE   r!   r   r   r   r      s4    "2
& &TK Kr   r   dummyz$An example format that does nothing.z.foobar .nonexistentextiI)
rF   numpyr,    r   corer   r   format
add_formatr!   r   r   <module>rN      sP      zK& zK| 
*	
   6 r   