Is there a way to test code using iPhone camera in the simulator?
(Somebody must have written something - you could have a replacement component that simulates the camera)
In the simulator there are some sample photo library images that you can access.
Use: UIImagePickerControllerSourceTypePhotoLibrary
If you want to test your actual camera API usage, you would have to closely emulate a fairly large non-trivial portion of the AVFoundation framework.
If you just want to test the rest of your app, you could just ifdef out all the camera related stuff and replace your image capture and preview data with a static png.
Related
I couldn't find an answer to this question, and looking at Apples own apps like iMovie on iOS, the video picker does not offer a slow motion option on the iPhone 5S.
The image picker offers very little control over the video. If you are willing to dive deeper into the APIs you can use AVFoundation to capture your video and manipulate the camera properties as you see fit.
iOS 7 introduces a new AVCaptureDeviceFormat class that will give you the maximum and minimum supported frame-rates for the capture device, and you can use these to set a custom frame rate on the camera itself. I don't have an iPhone 5S to hand so I can't actually verify whether this API goes all the way down to 120FPS.
I have searched everywhere and tried mixing and matching different bits of code but I haven't found anything that works or anyone with the same question.
Basically I want to be able to create video demos of iPhone apps that include standard UIKit elements and also the image coming from the camera (video preview layer). I don't want to use airPlay or iOS simulator to project onto the desktop then capture because I want to be able to make videos outside in public. I have successfully been able to video capture the screen with this code but with the video preview layer being blank. I read that its because its using openGL and what I'm capturing is from the CPU, not the GPU. I have successfully used GPUImage from Brad Larson to capture the video preview layer but it doesn't capture the rest of the UIView. I have seen code that combines both and converts to an image but I'm not sure if that would be too slow for realtime video capture. Can someone point me in the right direction?
It might not be the cleanest solution, but it will work nonetheless: did you consider jailbreaking? I hope Apple does sue me for this one but if you really want to record your screen then simply install a screen recorder. Enough options can be found: http://www.google.be/search?q=iphone+jailbreak+record+screen
And if you don't like it: recover your phone for a previous backup.
(for the record: I'm against jailbreaking and posting this from a productivity point of view)
Is it possible to make camera work from, application code? As here is need to capture Image inside my application through iPhone camera. And to upload that on web.
Yes.
I have a small query.
If i use the camera api of phomnegap, it brings up the complete camera screen on the app.
Is their a way by which we can use some part of the camera screen for our logo or insert some text.
You can't with the built in camera API. I don't think it would really be expected, either.
Not using stock PhoneGap. You would instead need to use some native iOS AV APIs from Objective C.
This is no typical programming question.
I am currently developing an app using the latest SDK. This app will use the UIImagePickerController for taking pictures with the built-in camera.
I know the new iPhone 4 has 2 cameras built in. But the simulator doesn't support the camera in any way, so there's is now way to test the camera controller on a new iPhone. I do have a iPhone 3G to test my app with.
But what I want to know now, if someone can provide me a screenshot of the UIImagePickerController in camera mode running on his iPhone 4? But I really need an image from the UIImagePickerController not from the common camera application on the iPhone, because those two image pickers aren't the same! I can see this on my iPhone 3G: the built-in camera application and the UIImagePickerController are having a totally different UI.
Why I am asking for that? Because I want to know if there is a built-in switch in UIImagePickerController to switch between the front and rear camera. I know there is such a switch if you want to take a picture using the common iPhone 4 camera application, but I don't know if this switch also exists in UIImagePickerController from the SDK.
Thanks for your help!
C YA
Here you go. I managed to catch it with the zoom control and focus square.