9
我一直在尝试使用PIL模糊图像。在Python中使用PIL模糊图像
从我知道我需要复制图像,然后更改每个像素到他周围的像素,从原始图片的平均 。所以我并没有得到真正不远, 我使用python的3.3倍
from PIL import Image
img = Image.open("source")
im = Image.copy(img)
我知道如何使用putpixe,并得到一个像素的数据,但我无法弄清楚如何获得 平均的像素周围。
在此先感谢您的帮助!
还有ImageFilter.GaussianBlur(radius = 2),它比ImageFilter.BLUR好得多 – Sri
当我做'blurred_image.show()'并尝试将其保存为位图文件(.BMP),如何将其更改为PNG或JPG格式? – 0x499602D2
@ 0x499602D2:可以将其作为单独的问题提出;它与原始问题没有关系。 – tom10