How to show photos from PHPickerViewController the way they are shown in Apple's Photos with "View Full HDR" enabled? I've found all EDR-related talks, rendering CIImage into MTKView already... nothing helps, image is same as in UIImageView. How?! :–)
What I do now:
I get photo URL (copy) via provider.loadFileRepresentation(forTypeIdentifier: UTType.image.identifier
I create MTKView with metalLayer.wantsExtendedDynamicRangeContent = true and other recommended settings
I load CIImage from URL provided earlier.
I render CIImage via CIContext backed with mtlCommandQueue with option .useSoftwareRenderer: false.
And I still get "normal" image.
Exact same image is being displayed in Photos app with much brighter whites, and this is exactly what I want to achieve.
Please help :)
Thanks!
Post
Replies
Boosts
Views
Activity
Hi,Just found out that MLWordTagger can help my application in a huge way. Create ML is simple, that is awesome! Everything works great, but I do not see fast training. Creating MLWordTagger barely uses one core. Why is that? Can it be faster? Maybe my question is dumb, but I'm new to this.BTW, there is basically no information on this subject in the Internet. Why? This is so incredibly powerful feature!Here is my code:private func train(trainingDataUrl: URL, validationDataUrl: URL, outputTo modelUrl: URL) {
let trainingData = try! MLDataTable(contentsOf: trainingDataUrl)
let testingData = try! MLDataTable(contentsOf: validationDataUrl)
let model = try! MLWordTagger(
trainingData: trainingData,
tokenColumn: "tokens",
labelColumn: "labels",
parameters: MLWordTagger.ModelParameters(validationData: testingData)
)
try! model.write(to: modelUrl)
}