o
    rf                     @   s    d dl Z d dlmZ dd ZdS )    N)Imagec              	   C   s   t j|dd tt | }g }t|ddD ]D\}}t j| |}t|,}|	d}	|	
|}
|dd}t j||}|
|d |||f W d    n1 sUw   Y  qtd	 |D ]\}\}}t| d
| d|  qad S )NT)exist_ok   )startRGBZ03dz.jpgJPEGzModified images resolutions:z: z x )osmakedirssortedlistdir	enumeratepathjoinr   openconvertresizesaveappendprint)Zinput_folderZoutput_folderZnew_resolutionZimagesZresolutionsidxZ
image_nameZ
image_pathimgZ	rgb_imageZresized_imageZnew_image_nameZnew_image_pathwidthheight r   E/workspaces/Masterarbeit/13_resize_and_rename_images/output_10_CoT.pyresize_and_rename_images   s$   

r   )r   PILr   r   r   r   r   r   <module>   s    