drewes....@gmail.com wrote: > I'm new to python and I have 30.000 pictures. > I need to crop, let's say 100, parts of 256x256, randomly out of every > picture. > > I cant find an answer in the net, would be nice if someone could help me > out!
You can walk over the files with https://docs.python.org/dev/library/os.html#os.walk find out the image size and process the image with pillow http://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.size http://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.crop using https://docs.python.org/dev/library/random.html to determine what part of an image you want to pick. Now write some code and come back here if you run into problems you cannot solve yourself. -- https://mail.python.org/mailman/listinfo/python-list