o
    rf                     @   s    d dl Z d dlmZ dd ZdS )    N)Imagec           
   
      s   t j|st |  fddt  D }|  g }t|D ]K\}}tt j	 |5}|
d}||}|d dd}|t j	|| || d|d  d	|d   W d    n1 sgw   Y  q!td
 |D ]}	t|	 qsd S )Nc                    s&   g | ]}t jt j |r|qS  )ospathisfilejoin).0finput_folderr   D/workspaces/Masterarbeit/13_resize_and_rename_images/output_9_CoT.py
<listcomp>
   s   & z,resize_and_rename_images.<locals>.<listcomp>RGB   03z.jpgz: r   z x zModified images resolutions:)r   r   existsmakedirslistdirsort	enumerater   openr   convertresizesaveappendprint)
r   output_folder
resolutionfilesresolutionsifileimgnew_filenameresr   r
   r   resize_and_rename_images   s$   


$
r%   )r   PILr   r%   r   r   r   r   <module>   s    