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 10-06-2010, 09:45 PM   #1 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 2
adamj is on a distinguished road
Default Mapping touch to picture help?

Hi All,

I'm having a terrible time trying to figure out how to map a touch that is fired from my UIImagePicker cameraOverlayView onto the picture that is captured by [picker takePicture].

Ultimately I want to crop a small rectangle underneath the finger of the touch....which I originally thought would be simply, but I found out that it's not.

What's messing me up is the UIImageOrientation, the different aspect ratio (3:2 for screen, 4:3 for picture) and the scale. I know that the easiest way (programatically) to do this is to transform the image to fit the screen size and orientation and keep the touch point as is, but this is very slow to execute.

I'd prefer to reorient the point to fit the picture, however I really don't know where to start on this (googled like crazy). Can anyone point me in the direction of some good websites that might cover this, or share some code snippet or advice?

All I want to do is crop a 100x100 square under the touch point from the picture, I had no idea it was going to be so complex!

Cheers
Adam
adamj is offline   Reply With Quote
Reply

Bookmarks

Tags
cgimagecreate, cgrect, uiimage, uiimagepicker

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: 347
8 members and 339 guests
headkaze, mistergreen2011, nobstudio, Objective Zero, rayjeong, revg, Sloshmonster, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,655
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pungs
Powered by vBadvanced CMPS v3.1.0

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