D
D
Daniyar Gabbasov2014-12-23 12:28:34
Objective-C
Daniyar Gabbasov, 2014-12-23 12:28:34

How to get the frame from a picture in objective c?

Hello! Need to get a reverse image from an existing image
there is an image
ecf1636cc5fd4c07a47624958e4af43a.jpg
here white is considered an image on the calayer
need to get this please
451774623f3a4233ab48e814606f65cb.jpg
help solve the issue, thank you in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
An, 2014-12-23
@Flanker_4

You can get an image by mask using CoreGraphics
An example can be viewed here . If you don’t need an image, but just need to do this trick in ui, then look at QuartzCore (google mask CALayer tags)
Now as for the mask ... I didn’t quite understand how variant you can have it, but if it’s a square , then you can simply draw it through coreGraphics (create a context and draw the mask you need through CGContextAddRect)
Or, if you have it drawn in calayer, render it into the same picture as shown here same, you will need to create a mask
CoreImage will theoretically run faster... .
Unfortunately, I am not familiar with third-party computer graphics libraries, but I recommend that you dig into something ala OpenCV

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question