2

I'm trying to create a mask out of a custom shape. I tried it with image masking and the result is given below. While my desire result is not exactly.

Using this Mask Image

enter image description here

enter image description here

The visual effect that I want to have:

enter image description here

Can anyone provide some hints on how can I achieve my desire effect.

Ali Raza
  • 2,796
  • 1
  • 20
  • 24

1 Answers1

1

What you have achieved via masking is working correctly. Masking works on alpha channel, transparent area vs visible area and images you posted in your question show exactly that.

Masking won't be enough for the effect you want to achieve. You need to experiment with CIFilter api.

Check out cifilter.io that shows a few examples of how these are supposed to look like. You might want to check out the source code for the same.

If you run this iOS project in Xcode, it provides a very easy way to browse and choose which effect is the closest to what you want to achieve.

Good luck!

Tarun Tyagi
  • 9,364
  • 2
  • 17
  • 30
  • I want images effect like used in this application. https://apps.apple.com/us/app/printitfast-custom-products/id1473956438 – Ali Raza Jul 08 '21 at 08:57