I cannot figure out how to apply a blur filter to part of an image using PIL. I tried to do a google search and read the PIL documentation but didn't find anything useful. Thanks for the help.
You can cut out a fragment of the image, blur it and paste it back. For instance:
box = (30, 30, 110, 110) ic = image.crop(box) for i in range(10): # with the BLUR filter, you can blur a few times to get the effect you're seeking ic = ic.filter(ImageFilter.BLUR) image.paste(ic, box)
Source: https://habr.com/ru/post/1401361/More articles:Creating a Swing composite component for JToolbar - javaJAX-WS - NoSuchMethodError when receiving a message in a SOAP handler - javaJson array parameter using javascript - jsonSomething is blocking my memory, and the program freezes on GC.Collect () or GC.GetTotalAmountOfMemory (true) - garbage-collectionJquery gets the values โโof all test rows in a gridview table - javascriptHow to specify SEND interface for multicast in Python? - pythonUpload a single file using multiple threads - pythonHow to multicast (send) to the first network card? - cWhy should OutputStream be closed after entering android - javaHow to create a partial download in twisted? - pythonAll Articles