Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

How to Capture and Save an Image

Discussion in 'AR' started by justintheartist, Dec 3, 2018.

  1. justintheartist

    justintheartist

    Joined:
    Aug 11, 2017
    Posts:
    2
    Is it possible to capture an image and then save or send it somewhere? I'm starting with the Unity Example for Image Capture provided in the Magic Leap package, but I'd like to take it a step further and save the image.

    Thank you!
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,685
    Sure. Check out the sample for ImageConversion.EncodeToPNG, and just ignore the part about uploading to a server. There is a commented-out line there that shows how to write it to a file instead (using simply standard C# file I/O).
     
  3. pm484

    pm484

    Joined:
    Jun 4, 2019
    Posts:
    2
    Hey, were you able to figure it out? I am also struggling with the figuring out the path name of gallery or any other folder in magic leap. Thanks!
     
unityunity