TOCropViewController icon indicating copy to clipboard operation
TOCropViewController copied to clipboard

Is Ovalization Possible?

Open ghost opened this issue 5 years ago • 3 comments
trafficstars

First, thanks profusely for this awesome image cropping feature!!

Now to the question: Do you think it would be possible to add an enhancement to the circular cropping so that the circle can be ovalized so that the radius of the circular area is not constant, but rather, an oval area of the picture can be the crop results? Rotating the oval would also be quite handy. Thoughts / advice?

ghost avatar Apr 23 '20 20:04 ghost

G'day Mike! Thanks so much! I'm glad you're finding the library useful!

Hmm... yeah? What sort of use-case do you have that you would like the image to captured as an oval?

While the library can't do that in its current configuration, it certainly wouldn't be too much work to add it in. Currently the circle feature works by using a CALayer object that has a circular bitmap assigned to it to clip the top level view displaying the picture. The bitmap could easily be modified to be an oval instead of a circle.

What are you thinking of doing here exactly? :)

TimOliver avatar Apr 26 '20 10:04 TimOliver

Thanks for getting back to me about this Time!

I’ve been working on a “word game helper app” called WordWhisk (the first version of which has recently been released on the App Store) which lets someone put in a bunch of letters and get a list of words those letters can compose. It’s useful to help out for iOS games like One Clue Crossword and Wordscapes.

An enhancement I am now adding to WordWhisk lets the user grab a screenshot of the letter presentation in the game from which the letters are pulled so that the user doesn’t have to type everything. Circular will work wonderfully for Wordscapes and rectangular for One Clue Crossword. It’ll also let them take a pic of something someone may have written on a piece of paper, a door, or whatever. I’ve enhanced the manipulation of the circle and rectangle shapes so they can be moved around on the image and resized/reshaped – that way the user can easily insure that only the letters to be used in the game will be selected. Oval will likely be useful.

I’ve got the rectangle and circle/oval resizing working in a separate little testing app and am now adding it to your letter recognizing app so we’ll see how it goes.

ghost avatar Apr 27 '20 17:04 ghost

Howdy Tim!

And thanks so much for getting back to me!

I’ve been working on a “word game helper app” called WordWhisk (the first version of which has recently been released on the App Store) which lets someone put in a bunch of letters and get a list of words those letters can compose. It’s useful to help out for iOS games like One Clue Crossword and Wordscapes.

An enhancement I am now adding to WordWhisk lets the user grab a screenshot of the letter presentation in the game from which the letters are pulled so that the user doesn’t have to type everything. Circular will work wonderfully for Wordscapes and rectangular for One Clue Crossword. It’ll also let them take a pic of something someone may have written on a piece of paper, a door, or whatever. I’ve enhanced the manipulation of the circle and rectangle shapes so they can be moved around on the image and resized/reshaped – that way the user can easily insure that only the letters to be used in the game will be selected. Oval will likely be useful.

I’ve got the rectangle and circle/oval resizing working in a separate little testing app and am now adding it to your letter recognizing app so we’ll see how it goes.

And I’ll put a bit of this reply back on GitHub.

Mike

On Apr 26, 2020, at 4:14 AM, Tim Oliver [email protected] wrote:

G'day Mike! Thanks so much! I'm glad you're finding the library useful! Hmm... yeah? What sort of use-case do you have that you would like the image to captured as an oval?

While the library can't do that in its current configuration, it certainly wouldn't be too much work to add it in. Currently the circle feature works by using a CALayer object that has a circular bitmap assigned to it to clip the top level view displaying the picture. The bitmap could easily be modified to be an oval instead of a circle.

What are you thinking of doing here exactly? :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/TimOliver/TOCropViewController/issues/410#issuecomment-619523233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALM2SGIIMLQE4H7UI6TGGLROQCPNANCNFSM4MPNC6WQ.


Mike Rossetti [email protected]

The secret of eternal youth is arrested development. Alice Roosevelt Longworth

ghost avatar Apr 27 '20 17:04 ghost