iphone - How to crop image according to the shape created on touch -


I want to crop the image when touching the screen and creating the user a special size.

For example, when the user touches a figure (green color) and draws the image below, then the image inside the shape will be cut and displayed as a new UIImage. :

Enter image details here

I know that How to conceal an image and also know how to cut an image in rectangular shapes but do not know about it. Can anyone help?

Try to do something like this, this is not the right question, but for a little change this algorithm Should work for you!

This does not give the exact code for any platform, but mathematical geometry and general looping algorithm how to accomplish such a task.

Within iOS you will need to create new image creation (and actually pixel transcript) using core graphics.

Things you'll do to see. Screen resolution for actual image resolution If image resolution is different, when you calculate the calculation of crop area, the crop zone can increase or shrink when the actual backing image is displayed from the screen.


Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -