Currently, I can blur the whole bitmap (by resizing it, for example, for example).
The effect I'm trying to accomplish is selective blurring: the bitmap of the result will be blurry, minus the round / oval portion, which will still be sharp:

The tricky part is that the sharp oval part can be smaller or larger and must be movable (its coordinates are not always the center of the original bitmap image).
I have already found a solution, but I do not consider it a good solution:
- Copy the original bitmap to two different bitmaps (background and foreground).
- Blur background.
- Trim the foreground to the desired shape (round or oval)
- Delete the foreground borders a bit (to avoid too sharp a difference between the foreground and background images)
- Return two images together
- Export it as a bitmap

Another solution may be to recreate the blur algorithm that will run through each pixel of the original bitmap and apply the amount of blur higher or lower depending on the portion of the bitmap.
source share