Photos & Camera

RSS for tag

Explore technical aspects of capturing high-quality photos and videos, including exposure control, focus modes, and RAW capture options.

Post

Replies

Boosts

Views

Activity

[iPadOS18 Beta3] on iPad 7th gen, camera app cannot detect QR code
Hi, After installing iPadOS18 Beta3 on my iPad 7th gen, the default camera app no ​​longer detects QR codes. I tried updating to Beta7, but the issue remained. Also, third-party apps that use AVCaptureMetadataOutput in AVFoundation Framework to detect QR codes also no longer work. You can reproduce the issue by running default camera app or the AVFoundation sample code from the Apple developer site on iPad 7th gen (iPadOS18Beta installed). https://developer.apple.com/documentation/avfoundation/capture_setup/avcambarcode_detecting_barcodes_and_faces Has anyone else experienced this issue? I would like to know if this issue occurs on other iPad models as well. This is similar to the following issue that previously occurred with iPadOS 17.4. https://support.apple.com/en-lamr/118614 https://developer.apple.com/forums/thread/748092
2
0
125
4d
Center stage control mode not working for iPad on front camera with .photo session preset.
I am working on an iPad app using the front camera. The camera logic is implemented using the AVFoundation framework. During a session I use central stage mode to center the face with front camera . Central stage mode works fine in all cases except when I set the session preset photo. In other presets: high, medium, low, cif352x288, vga640x480, hd1280x720, hd1920x1080, iFrame960x540, iFrame1280x720, inputPriority presets central stage mode working except photo session preset. Can you explain why this happens or maybe it is an unobvious bug? Code snippet: final class CameraManager { //MARK: - Properties private let captureSession: AVCaptureSession private let photoOutput: AVCapturePhotoOutput private let previewLayer: AVCaptureVideoPreviewLayer //MARK: - Init init() { captureSession = AVCaptureSession() photoOutput = AVCapturePhotoOutput() previewLayer = AVCaptureVideoPreviewLayer(session: captureSession) } //MARK: - Methods Setup Camera and preview layer func setupPreviewLayerFrame(view: UIView) { previewLayer.frame = view.frame view.layer.insertSublayer(previewLayer, at: 0) setupCamera() } private func setupCamera() { guard let videoCaptureDevice = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .front) else { return } AVCaptureDevice.centerStageControlMode = .app AVCaptureDevice.isCenterStageEnabled = true do { let input = try AVCaptureDeviceInput(device: videoCaptureDevice) captureSession.addInput(input) captureSession.addOutput(photoOutput) /// high, medium, low, cif352x288, vga640x480, hd1280x720, hd1920x1080, iFrame960x540, iFrame1280x720 and inputPriority presets working except photo session preset captureSession.sessionPreset = .photo DispatchQueue.global(qos: .userInteractive).async { self.captureSession.startRunning() } } catch { print("Error setting up camera: \(error.localizedDescription)") } } }
0
0
277
2w
UIImagePickerController inside of a SwiftUI View dismisses the view, rather than firing the callback.
Hello, When using a UIImagePickerController with the .camera configuration I'm currently facing an issue where the delegate function imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) is not firing. But rather UIKit internals dismisses the parent view to the UIImagePickerController. I'm showing the picker controller through a UIViewControllerRepresentable. It does not always occur however, and the behavior is very flakey, sometimes it fires when pressing the b, sometimes it does not. When setting a breakpoint at the dismiss function when pressing the "Use Photo" button, UIKit internals dismisses the view, not my own code.
1
0
244
2w
Detect when main app launched by LockedCameraCapture for permission
I have a LockedCameraCapture extension working well, however there is one situation I cannot find a solution to. If the user has not yet provided camera access permission then the main app will be launched rather than the LockedCameraCapture extension. I cannot find a mechanism by which my main app can detect that this was the reason for the launch and thereby request permission. When the button is pressed from the control center without permission the app is run and the CameraCaptureIntent is called so I can prompt the user from there. However, as best I can tell the CameraCaptureIntent is not called when launched from a locked Lock Screen, the app is simply opened. My app has a variety of functions, most of which do not involve the camera so I cannot just always prompt the user for camera access on open. Is there any mechanism by which my main app can detect it was launched for this reason so it could ask for permission? Thank you!
2
1
238
2w
some problems with vision kit
I integrated Visionkit into my app, to get content of an image. That works really fine. Now I realized that iPhone8 crashes on launching the app, because of the following code: available(iOS 17, *) extension Details: ImageAnalysisInteractionDelegate {} is there a workaround for older versions?
0
0
140
3w
Questions about LockedCameraCapture
Can the extended code created by Capture Extension call the code of the main project? I added the control via Widget Extension and I see the perform method is called in my intent but I am missing the part where this perform method will open the UI to capture the photo. This is my intent: struct MyAppCaptureIntent: CameraCaptureIntent { static var title: LocalizedStringResource = "MyAppCaptureIntent" typealias AppContext = MyAppContext static let description = IntentDescription("Capture photos with MyApp.") @MainActor func perform() async throws -> some IntentResult { let dialog = IntentDialog("Intent result") do { if let context = try await MyAppCaptureIntent.appContext { return .result() } } catch { // Handle error condition. } return .result() } } struct MyAppContext: Decodable, Encodable { var data = ContextData() } struct ContextData: IntentResult, Decodable, Encodable { var value: Never? { nil } } How can I connect this with my LockedCameraCaptureExtension? Can you provide a complete demo?
1
0
255
3w
Airdrop Photos Lose Quality
Hi, I’m a photographer and recently after I upgrade to ios 18 beta, noticed that when I airdrop my photos (which I took with medium format cameras with extremely high quality) from my macbook pro to my iphone, they lose quality alot!! The sharpness is completely gone, and details are very less. Does anyone know how to solve this?!
1
0
219
Jul ’24
Strange asset url suffix on iOS 18 (method PHCachingImageManager().requestAVAsset(forVideo:... )
Hello pals, I investigated strange bug with video url and found out that on iOS 18 method PHCachingImageManager().requestAVAsset(forVideo: returns very weird asset.url with strange suffix "someFileName.MOV#YnBsaXN0MDDRAQJfEBtSZWNvbW1lbmRlZEZvckltbWVyc2l2ZU1vZGUQAAgLKQAAAAAAAAEBAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAr" example: PHCachingImageManager().requestAVAsset(forVideo: asset, options: options) { asset, _, _ in if let asset = asset as? AVURLAsset { print(asset.url) // prints - file:///.../data/Media/DCIM/100APPLE/IMG_0011.MOV#YnBsaXN0MDDRAQJfEBtSZWNvbW1lbmRlZEZvckltbWVyc2l2ZU1vZGUQAAgLKQAAAAAAAAEBAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAr } } on iOS below 18 - it return regular url "...someFile.MOV" how to correct this bug for iOS 18 users? Please suggest me something, or maybe I'm using this method incorrectly?
1
1
199
Jul ’24
How to open adobe raw image with phpickerviewcontroller
Hi, Experts I am using phpickerviewcontroller to open photos in iPhone. It works well for most of photos, such as jpeg, heif. But it failed for photo with raw image on iPhone14 plus. And I found the TypeIdentifier for it is com.adobe.raw-image. I use result.itemProvider.loadFileRepresentation(forTypeIdentifier: "com.adobe.raw-image") to load the raw photo, it always failed, with "Error loading file representation: Cannot load representation of type com.adobe.raw-image". I had try some other param: such as forTypeIdentifier: public.image, public.camera-raw-image, both of them did not work. How can I load this type of raw photo? Below is my code details: // MARK: - PHPickerViewControllerDelegate func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) { picker.dismiss(animated: true, completion: nil) var resultIndex = 0 DDLogInfo("Pick \(results.count) photos") for result in results { resultIndex += 1 DDLogInfo("Process \(resultIndex) photo") DDLogInfo("Registered type identifiers for itemProvider:") for typeIdentifier in result.itemProvider.registeredTypeIdentifiers { DDLogInfo("TypeIdentifier \(typeIdentifier)") } if(result.itemProvider.hasItemConformingToTypeIdentifier(UTType.image.identifier)) { DDLogInfo("Result \(resultIndex) is image") } if result.itemProvider.canLoadObject(ofClass: UIImage.self) { DDLogInfo("Can load \(resultIndex) image") //more code for photo } else { DDLogInfo("Load special image, such as raw") result.itemProvider.loadFileRepresentation(forTypeIdentifier: "com.adobe.raw-image") { url, error in if let error = error { DDLogInfo("Error loading file representation: \(error.localizedDescription)") return }
2
1
258
Jul ’24
Camera is not detected by using ImageCaptureCore framework
Hi, Currently my app is using ImageCaptureCore framework to work with DSLR camera. But when I tested it in iOS 18, it turns out my camera cannot do connection with iPhone by wired connection. It seems there are some developer run into the same problem, there are: https://forums.developer.apple.com/forums/thread/756960 https://stackoverflow.com/questions/78618886/icdevicebrowser-fails-to-find-any-devices-after-ios-18-update And it’s reproduced in some apps that expected to use ImageCaptureCore framework. I’d like to clarify that: Is the issue currently iOS 18 bugs? Is there any plan of Apple to remove wired connection support of ImageCaptureCore framework? Thank you.
0
0
180
Jul ’24