Skip to content

Resize and rename a numerous image file such as jpg and png images. Rename any files name

Notifications You must be signed in to change notification settings

mhhabib/Resize-and-rename

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Mutiple image resize and rename with Python Pillow

What's the looks? web

Why this app you need to use?

  • This app can resize a multiple file such as jpg and png images within a second.
  • This app can edit your all file name such as images, videos within a second
  • In the time of resizing your images, this app maintain aspect ratio
  • Option also available to force resize
  • After rename your file, it's easy to sort

How the code works?

To make this, first you need to download pillow & them import to your code

from PIL import Image
import os

to maintain aspect ratio, following line will work better

i.thumbnail((200,200)) # (width,height) in pixel

to mforce the size, following line will work better

i=i.resize((200,200),Image.ANTIALIAS) # Image.ANTIALIAS forces here to make the image into 200px X 200px

In the following rename code, we have to be said the current image folder and target folder

img_source='C:\\Users\\MH HABIB\\Desktop\\python\\projet\\images\\'
img_destination='C:\\Users\\MH HABIB\\Desktop\\python\\projet\\images\\200'

About

Resize and rename a numerous image file such as jpg and png images. Rename any files name

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages