The script uses the Moviepy module, which allows you to trim, add audio, set video speed, add VFX, etc. With the following automation script, you can not only use Python to optimize videos, but also use it to optimize images. # Image Optimizing # pip install Pillow import PIL # Croping im = ("Image1.jpg") im = im.crop((34, 23, 100, 100)) # Resizing im = ("Image1.jpg") im = im.resize((50, 50)) # Flipping im = ("Image1.jpg") im = im.transpose(_LEFT_RIGHT) # Rotating im = ("Image1.jpg") im = im.rotate(360) # Compressing im = ("Image1.jpg") im.save("Image1.jpg", optimize=True, quality=90) # Bluring im = ("Image1.jpg") im = im.filter() # Sharpening im = ("Image1.jpg") im = im.filter() # Set Brightness im = ("Image1.jpg") im = (im) im = im.enhance(1.5) # Set Contrast im = ("Image1.jpg") im = (im) im = im.enhance(1.5) # Adding Filters im = ("Image1.jpg") im = (im) im = (im) im = (im, 4) # Saving im.save("Image1.jpg") The script uses the popular Pillow module. This great automation script can help you process images better and you can edit them just like in Photoshop.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |