Replies: 2 comments 1 reply
-
|
One of the great things about
That would be something like the following (not tested): def blur_region(image, left, top, width, height) do
with {:ok, region} <- Image.crop(image, left, top, width, height),
{:ok, blurred} <- Image.blur(region) do
Image.compose(image, blurred, x: left, y: top)
end
endI have a few ideas no how to generalise this kind of operation where an image is represented as a set of composable regions but I've not found a model I'm entirely happy with yet. |
Beta Was this translation helpful? Give feedback.
-
|
There is another approach whereby you blur a copy of the image and then create an image mask. The mask can be an arbitrary shape (helpful if you want circular or elliptical blurring of faces) and then you compose the mask as an alpha channel. I can work up an example of that over the weekend. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to blur only the section of an image? Like the ability to blur only a cropped part of an image?
Beta Was this translation helpful? Give feedback.
All reactions