Post

Replies

Boosts

Views

Activity

Reply to Issue adding Apple ProRaw (DNG) files to Photos Library
I tried a different approach to adding the images to the Photo Library, using: func createStillAssetOnAlbum(asset: URL, album: PHAssetCollection) { let photoURL = asset PHPhotoLibrary.shared().performChanges ({ let creationRequest = PHAssetCreationRequest.forAsset() let placeHolderAsset = creationRequest.placeholderForCreatedAsset creationRequest.addResource(with: .photo, fileURL: photoURL, options: nil) guard let albumChangeRequest = PHAssetCollectionChangeRequest(for: album) else { print("album change request has failed") return } albumChangeRequest.addAssets([placeHolderAsset] as NSArray) }, completionHandler: { success, error in if success { print("photo (and adjustments) saved successfully") self.importCount += 1 } else if let e = error { print("error saving photo (and adjustment): \(e)") self.nonImportedImageCount += 1 } }) } This seems to work as I would expect.
Apr ’23
Reply to NSOpenPanel navigate to connected iPad?
@IBAction func selectLisaIngestPreviewFolder(_ sender: Any) { let openPanel = NSOpenPanel() openPanel.canChooseFiles = false openPanel.canChooseDirectories = true openPanel.message = "Select Lisa Preview folder" let response = openPanel.runModal() switch response.rawValue { case 1000: print(response.rawValue) case 1001: print(response.rawValue) default: return } }
May ’23