Skip to content

Commit c118f19

Browse files
committed
added the _blur method to solve the problem with the default one
1 parent 7a7542e commit c118f19

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sorl_thumbnail_avif/thumbnail/engines/pil_engine.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from sorl.thumbnail.engines.pil_engine import Engine
33

44
from PIL import Image, ImageFile
5+
from PIL.ImageFilter import GaussianBlur
56
import pillow_avif # noqa: F401
67

78

@@ -63,3 +64,6 @@ def _get_raw_data(
6364
bf.close()
6465

6566
return raw_data
67+
68+
def _blur(self, image, radius):
69+
return image.filter(GaussianBlur(radius=radius))

0 commit comments

Comments
 (0)