How to rotate an image in iOS using gyroData? - ios5

Using coreMotion, I calculated the gyroData. Now I want to rotate an image according to the iPhone orientation. Please tell me how can I rotate the image?

Related

Camera screen size in iphone 5

I am designing a camera app in ios. I see that Video uses the whole screen in iphone 5 but camera does not. So I wanted to know the screen width and height of the camera screen that the default camera uses to design my app.
That's because unlike the feed from the video camera, the feed from the camera has a different aspect ratio from the devices screen. To rectify this, you'll need to resize your preview layer to match the aspect ratio of the feed, or you'll need to change the video gravity property of your video preview layer.
Once of these should suffice:
[myPreviewLayer setVideoGravity:AVLayerVideoGravityResizeAspectFill];
[myPreviewLayer setVideoGravity:AVLayerVideoGravityResize];

AVCaptureVideoPreviewLayer Video layer rotating but image doesn't

I'm apply Orientation (e.g.:- AVCaptureVideoOrientationLandscapeLeft,AVCaptureVideoOrientationPortraitUpsideDown) on object of AVCaptureVideoPreviewLayer, Its rotating the video layer perfectly, but captured image always displaying in Portrait mode.
Note: App doesn't have any orientation, its camera setting feature that rotate (0,90,180,270 degree) capture preview layer.
Transformation on captured image not working.

Glass lozenge distortion on iPhone

Is it possible to use the image distortion called "Glass Lozenge" which is available as part of core image on the iPhone to distort an image? If you don't know what I mean just open core image funhouse.

Use accelerometer

How to rotate the UIImageView on z-axis with using accelerometer in iPhone device. Please help me out with any source code.
The z-direction points towards you, so to say. Try accessing the layer of the view. It should have a z-parameter.
here is the accelerometer example code ...
http://www.devx.com/wireless/Article/44799/1954
There is also SO post
How can I rotate an image in response to the iPhone's accelerometer?

How can I move image with the help of accelerometer iphone xcode?

I am working on xcode4.1 not in coca 2d. I want to handle image through accelerometer. How can I do this?
Use an UIImageView to display it. Use the center property to move it on the screen.
Use the UIAccelerometerDelegate to get the move of the phone.