Re: access pictures files without knowing the names
Michael C <[email protected]> Tue, 16 May 2017 12:15:09 -0700
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <CANyKM1g7wkjKsvT=W_6qkvOi6x-wU10k=Fk=VF-cEBAtTmoHxg@mail.gmail.com> |
--===============2019881879978007263== Content-Type: multipart/alternative; boundary="001a113f26b289df53054fa8fd88" --001a113f26b289df53054fa8fd88 Content-Type: text/plain; charset="UTF-8" ok! On Tue, May 16, 2017 at 12:12 PM, eryk sun <[email protected]> wrote: > On Tue, May 16, 2017 at 6:50 PM, Michael C > <[email protected]> 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. > --001a113f26b289df53054fa8fd88 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">ok!<div><br></div></div><div class=3D"gmail_extra"><br><di= v class=3D"gmail_quote">On Tue, May 16, 2017 at 12:12 PM, eryk sun <span di= r=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">eryksu= [email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_quote" styl= e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div cl= ass=3D"HOEnZb"><div class=3D"h5">On Tue, May 16, 2017 at 6:50 PM, Michael C= <br> <<a href=3D"mailto:[email protected]">mysecretrobotfactory@= gmail.<wbr>com</a>> wrote:<br> > I am running this code so I can do some image manipulation with them.<= br> > The thing is, I have a lot of pictures to go through, so I can't t= ype the<br> > file names one by one in the code. However, the order of the files to = be<br> > processed doesn't matter, so getting them in a random fashion is a= lright!<br> ><br> > How do I make the python code open picture files? thanks!<br> ><br> > ## need to open random png. Any png.<br> ><br> > from PIL import Image<br> ><br> > ## need to load picture so I can process them. Any pictures is fine as= <br> > ## I need to process every picture in the folder<br> > im =3D Image.open('1.png')<br> ><br> > ## do my things...<br> <br> </div></div>This questions isn't about ctypes. Please ask this on the p= ython-tutor list.<br> </blockquote></div><br></div> --001a113f26b289df53054fa8fd88-- --===============2019881879978007263== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot --===============2019881879978007263== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ctypes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ctypes-users --===============2019881879978007263==--