o
    qrf                     @   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}d}|D ]F}| dr^t j| |}t	
|}|d}||}|dd}	t j||	}
||
 ||	 d|d  d	|d  d
7 }|d7 }qt| d S )NzModified images resolutions:
   )z.png.jpgz.jpegz.bmpz.gifRGB03r   z: r   z x 
)ospathexistsmakedirssortedlistdirlowerendswithjoinr   openconvertresizesaveprint)input_folderoutput_folder
resolutionimage_filesZ
output_strZimage_numberfileimg_pathimgZnew_file_nameZnew_img_path r   C/workspaces/Masterarbeit/13_resize_and_rename_images/output_3_0S.pyresize_and_rename_images   s$   




"r   )r   PILr   r   r   r   r   r   <module>   s    