o
    crfA                     @   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 }|  d}t|D ]K\}}tt j	 |5}|
d}||}	|d dd}
|	t j	||
 ||
 d|d	  d
|d  d7 }W d    n1 sgw   Y  q!t| d 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_12_RP.py
<listcomp>   s   & z,resize_and_rename_images.<locals>.<listcomp>zModified images resolutions:
RGB   03z.jpgz: r   z x 
)r   r   existsmakedirslistdirsort	enumerater   openr   convertresizesaveprint)r   output_folder
resolutionimagesZmodified_images_infoi
image_nameimgZrgb_imgZresized_imgnew_image_namer   r
   r   resize_and_rename_images   s   


$r#   )r   PILr   r#   r   r   r   r   <module>   s    