Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear image with fade border

I have two UIImageView with same frame. One imageView above second imageView now I'm erasing upper imageView using Core Graphics. My problem is that the border of eraser is very sharp I want faded border i.e. after erasing the upper image should match the lower one's pallet. See below example -
enter image description hereenter image description here
I used these two images and below is result -
enter image description here

As you can see in this image eraser's border is very sharp. I want to make it faded out like in the middle it should be dark then light then more light and so on i.e. we cant see the width and end of brush. And here is my - My Sample Code
Let me know if my question is not clear enough.

like image 612
TheTiger Avatar asked Nov 20 '12 06:11

TheTiger


People also ask

What tool gives fade to pictures?

The easiest way to add faded effect on the photograph is by using the Fotophire Editing Toolkit.

How do I fade the edges of an image in Canva?

Simply select the photo, then click “filter” and “advanced options.” Slide to the right to blur, and to the left to sharpen.


1 Answers

You can have a png image like brush (dark in the middle and light in the corner) and draw the image over your image like this.

        [eraser drawAtPoint:location blendMode:kCGBlendModeDestinationOut alpha:1];
like image 192
Ramaraj T Avatar answered Sep 21 '22 02:09

Ramaraj T