o
    rfn                     @   s    d dl Z d dlmZ dd ZdS )    N)Imagec           
   	   C   s   t j|st | tt | }d}t|D ]P\}}t j| |}t j||d dd}t	|+}	|	
d}	|	|}	|	| ||d dd|d  d|d  d	7 }W d    n1 scw   Y  qt| d S )
NzModified images resolutions:
   03dz.jpgRGBz.jpg: r   z x 
)ospathexistsmakedirssortedlistdir	enumeratejoinr   openconvertresizesaveprint)
input_folderoutput_folder
resolutionimage_filesZmodified_images_resolutionsidx
image_fileZ
input_pathZoutput_pathimg r   D/workspaces/Masterarbeit/13_resize_and_rename_images/output_8_CoT.pyresize_and_rename_images   s   



*r   )r   PILr   r   r   r   r   r   <module>   s    