Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-24-2010, 05:59 AM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 96
Dvdkite is on a distinguished road
Default Change Perspective / Deform an UIImage, possible solutions?

Hi Guys,

I'm actually working on a solution for this problem.
I would like to change the perspective of an UIImage with a finger touch on the corner of interest. This image will explane exactly what I want:



Uploaded with ImageShack.us

The best thing could be to give the possibilities to replicate the same function as photoschop (ctrl + T and then hold CTRL and you can deform the image from any corner).
Is there any easy way to do this? Is there any ways(function to provides the coordinates of the four corner points and let it deform/change the perspective of an UIImage?

A normal Frame is a rectangle (rect). Can you set a frame with something that is not a RECT but a sort of "shape" identified by the 4 corner points of an UIImage?

I actually have no idea about create a funtion able to do such transform.

Any help , suggestion or link will be appreciated!
I'll post my search result here.

Thanks ,

David
Dvdkite is offline   Reply With Quote
Old 05-24-2010, 07:46 AM   #2 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 864
nobre84 is on a distinguished road
Default

Study Affine Transformations, what you want is called shearing... It doesn't have built-in functions in the sdk (it does for scaling, rotation, etc), but is easily doable creating one with CGAffineTransformMake with the correct coefficients

Take a look at this: iPhone Development: CGAffineTransform 1.1 - A little more
nobre84 is offline   Reply With Quote
Old 05-24-2010, 09:55 AM   #3 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 96
Dvdkite is on a distinguished road
Default

Quote:
Originally Posted by nobre84 View Post
Study Affine Transformations, what you want is called shearing... It doesn't have built-in functions in the sdk (it does for scaling, rotation, etc), but is easily doable creating one with CGAffineTransformMake with the correct coefficients

Take a look at this: iPhone Development: CGAffineTransform 1.1 - A little more
Thank you very much!
I'll play with it next days and I'll write here my impression!!

Thanks again!!!

David
Dvdkite is offline   Reply With Quote
Reply

Bookmarks

Tags
change, deform, perspective, uiimage

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 306
10 members and 296 guests
ajay123123, ashaman64, baja_yu, ChrisYates, guusleijsten, HemiMG, newDev, pkIDSF, Sami Gh, Steven.C
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,113
Posts: 402,878
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:52 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0