2

I'm building an iphone photo app. I don't know how to achieve this kind of effect on an image:

enter image description here

When the user drags a finger across the arrow, I want the image to be distorted accordingly. How can I achieve this? Is there any framework that makes this process simple?

Thank you.

Fahim Parkar
  • 30,974
  • 45
  • 160
  • 276
Jinx
  • 23
  • 1
  • 2

2 Answers2

0

No clue about iOS, but the look reminds me of a thin-plate spline warp. It's quite easy to implement in OpenGL, a quick Google search for example code returns plenty of hits.

Francesco Callari
  • 11,300
  • 2
  • 25
  • 40
-1

From the sound of it I think your looking for the CoreImage framework. Look into the various distortion effects...in particular CIBumpDistortionLinear.

I don't have any code so check out this tutorial and read up on CoreImage.

maelswarm
  • 1,163
  • 4
  • 18
  • 37
  • Thank you for the answer @Roecrew. Actually, I did look at CIBumpDistortionLinear before asking the question. The problem is the effect it makes, which is a kind of a "bump strip" as you can see here [link](http://iosapi.xamarin.com/index.aspx?link=T%3AMonoTouch.CoreImage.CIBumpDistortionLinear), is not what I want. Another problem is I couldn't make it work (even with default arguments) although the CIBumpDistortion worked fine. – Jinx Oct 29 '14 at 14:25