QuickLook and .heic

I"m trying to create a simple app for my students that will display .heic images taken with a nikon and them converted to .heic in the photos app. My attempts only result in the QuickLook viewer showing the images in 2d. Any guidance? Here is my ContentView:

import SwiftUI import QuickLook

struct ContentView: View { @State private var showQuickLook = false @State private var previewURL: URL? = nil // State to store the URL for Quick Look

var body: some View {
    VStack {
        Button("See it in 3D") {
            // Set the URL for the file from the bundle and toggle Quick Look presentation
            if let imageURL = Bundle.main.url(forResource: "Michelia_fuego", withExtension: "heic") {
                previewURL = imageURL // Set the preview URL if the image is found
                showQuickLook.toggle() // Toggle to trigger Quick Look presentation
            } else {
                print("File not found") // Print error if the file is missing
            }
        }
        .quickLookPreview($previewURL) // Binding to the URL
    }
}

}

#Preview { ContentView() }

Hello @nsamm,

Are you capturing the images via the "3D Mode" on the Nikon camera? If so it's possible the images are stored in a way that the left and right images are not immediately understood by Quick Look.

Could you please file a feedback request with an example image?

Hello. I noticed your button says "See it in 3D". Can you provide more contextual information for your question? Especially about the contents of your heic files. What kind of content are you encoding into your heic files that should be displayed in 3D?

QuickLook and .heic
 
 
Q