Mac Cocoa |
Author |
Message |
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Fri Jul 23, 2010 3:10 pm Post subject: Camera |
|
|
mf - The cameraOverlayView blocks camera buttons
"I am overlaying an image over my UIImagePickerController and I want to
use the default buttons to control flash, cameraDevice (I am testing on an
iPhone 4.0).
The buttons remain visible but they can't be pushed." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Mon Jul 26, 2010 12:33 am Post subject: |
|
|
Monte Ohrt - Camera Image Orientation
"When you save the photo, it is possible that this information could get lost,
depending on the way you save it... I ran into a problem when trying to save
the camera image with UIImagePNGRepresentation(). For some reason this
loses the orientation info. I switched to UIImageJPEGRepresentation() and all
is well now." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Mon Aug 02, 2010 10:16 pm Post subject: |
|
|
MF - Taking more then one picture
"I'm trying to allow the users of my application to take more then one picture
without having to press the "take picture" button on my application again."
...
"Take a look at the AVFoundation framework additions in 4.0 (and even bet-
ter 4.1 if you have access to that). You can take pictures entirely under your
control and without using the standard picker controller." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Fri Dec 21, 2018 12:32 pm Post subject: |
|
|
so - iPhone AVFoundation camera orientation
Code: | - (void)deviceOrientationDidChange{
UIDeviceOrientation deviceOrientation = [[UIDevice currentDevice] orientation];
AVCaptureVideoOrientation newOrientation;
if (deviceOrientation == UIDeviceOrientationPortrait){
NSLog(@"deviceOrientationDidChange - Portrait");
newOrientation = AVCaptureVideoOrientationPortrait;
}
else if (deviceOrientation == UIDeviceOrientationPortraitUpsideDown){
NSLog(@"deviceOrientationDidChange - UpsideDown");
newOrientation = AVCaptureVideoOrientationPortraitUpsideDown;
}
// AVCapture and UIDevice have opposite meanings for landscape left and right (AVCapture orientation is the same as UIInterfaceOrientation)
else if (deviceOrientation == UIDeviceOrientationLandscapeLeft){
NSLog(@"deviceOrientationDidChange - LandscapeLeft");
newOrientation = AVCaptureVideoOrientationLandscapeRight;
}
else if (deviceOrientation == UIDeviceOrientationLandscapeRight){
NSLog(@"deviceOrientationDidChange - LandscapeRight");
newOrientation = AVCaptureVideoOrientationLandscapeLeft;
}
else if (deviceOrientation == UIDeviceOrientationUnknown){
NSLog(@"deviceOrientationDidChange - Unknown ");
newOrientation = AVCaptureVideoOrientationPortrait;
}
else{
NSLog(@"deviceOrientationDidChange - Face Up or Down");
newOrientation = AVCaptureVideoOrientationPortrait;
}
[self setOrientation:newOrientation];
}
|
|
|
Back to top |
|
|
|