U
    ®&^à  ã                   @   sN   d dl mZmZ d dlmZ G dd„ dejƒZe eje¡ e ejd¡ dS )é   )ÚImageÚ	ImageFile)Úi8c                   @   s$   e Zd ZdZdZdd„ Zdd„ ZdS )ÚPcdImageFileZPCDzKodak PhotoCDc                 C   sŠ   | j  d¡ | j  d¡}|d d… dkr0tdƒ‚t|d ƒd@ }d | _|dkrVd| _n|dkrdd	| _d
| _d| _dd| j dd fg| _	d S )Ni   é   s   PCD_znot a PCD filei  é   r   éZ   i¦ÿÿÿZRGB)i   i   Zpcd)é    r	   i   )
ÚfpÚseekÚreadÚSyntaxErrorr   Útile_post_rotateÚmodeÚ_sizeÚsizeZtile)ÚselfÚsZorientation© r   ú6/tmp/pip-install-a1j0c_p1/Pillow/PIL/PcdImagePlugin.pyÚ_open    s    zPcdImageFile._openc                 C   s$   | j r | j | j ¡| _| jj| _d S )N)r   ZimÚrotater   r   )r   r   r   r   Úload_end4   s    zPcdImageFile.load_endN)Ú__name__Ú
__module__Ú__qualname__ÚformatÚformat_descriptionr   r   r   r   r   r   r      s   r   z.pcdN)	Ú r   r   Ú_binaryr   r   Zregister_openr   Zregister_extensionr   r   r   r   Ú<module>   s   #