Draw UIImage in context with perspective?

I have a UIImage that is a square. When drawing in context, I do:

enter image description here

UIGraphicsBeginImageContextWithOptions(imageView.image!.size, imageView.opaque, 0.0)

//context
var drawCtxt = UIGraphicsGetCurrentContext()
var someImage = UIImage(...)

// draw the image
CGContextDrawImage(drawCtxt, imageRect, someImage!.CGImage)

      

I want to draw an image in perspective like this:

enter image description here

How can I draw the UIImage in context in perspective?

+3
ios objective-c iphone swift


source to share


No one has answered this question yet

Check out similar questions:

1665
How can I get the UITextField to move upward when there is a keyboard - when starting editing?
366
How to change the tintColor image in iOS and WatchKit
293
UIImageView missing image in launcher window on device
205
Cropping UIImage
26
CGContextDrawImage is EXTREMELY slow after having a large UIImage pulled into it
3
UIView conversion with perspective conversion to UIImage
1
Draw some of the context?
1
Draw UIImage from CIImage In drawRect:
0
Why is my CGImage 3 x UIImage size
0
Building on UIImage and keeping the original size



All Articles
Loading...
X
Show
Funny
Dev
Pics