Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

How do I properly open an image from a folder to process it?

$
0
0

I need to open images and edit them. But when opened, "no such file or directory" or "<ImagingCore object at 0x0000020625552F70>" comes out. The path is specified correctly, checked several times. How do I open the image correctly?Also how can I save an already edited image to another folder with the same name?'''

    from PIL import Image    import os    def convertImage():        folder_dir = "C:\проект\Images"        for images in os.listdir(folder_dir):        img = Image.open(images)        img = img.convert("RGBA")

'''


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>