Re: [ctypes-users] access pictures files without knowing the names
Brought to you by:
theller
From: Michael C <mys...@gm...> - 2017-05-16 19:15:19
|
ok! On Tue, May 16, 2017 at 12:12 PM, eryk sun <er...@gm...> wrote: > On Tue, May 16, 2017 at 6:50 PM, Michael C > <mys...@gm...> wrote: > > I am running this code so I can do some image manipulation with them. > > The thing is, I have a lot of pictures to go through, so I can't type the > > file names one by one in the code. However, the order of the files to be > > processed doesn't matter, so getting them in a random fashion is alright! > > > > How do I make the python code open picture files? thanks! > > > > ## need to open random png. Any png. > > > > from PIL import Image > > > > ## need to load picture so I can process them. Any pictures is fine as > > ## I need to process every picture in the folder > > im = Image.open('1.png') > > > > ## do my things... > > This questions isn't about ctypes. Please ask this on the python-tutor > list. > |