Frames Captured from Camera are Upside Down

Hello, I made a basic application that collects frames from Camera and write these on Disk as jpg images. My device is Nreal Light DevKit.

Well, I am able to collect and write frames successful but captured images are unfortunately Upside Down :frowning:

In order to collect and write frames, I use the class “CameraCaptureController.cs” shipped with NRSDK v1.8. ( NRSDK > Demos > RGBCamera > Scripts ). The scene that I use was the “RGBCamera” from NRSDK. ( NRSDK > Demos > RGBCamera.unity)

In particolar, I made the following modification into the “Update()” method of the class:


// UnityEngine.Texture2D
Texture2D img = RGBCamTexture.GetTexture();

// UnityEngine.ImageConversion
byte[] jpg_image = ImageConversion.EncodeToJPG( img );

string img_fl_name = “/sdcard/imgs/screen__”+this.RGBCamTexture.CurrentFrame.timeStamp+".jpg";

// System.IO.File
File.WriteAllBytes( img_fl_name , jpg_image );


This one was the only modification I made. (Scene remains in her default settings)

As side note, I specify that Unity Project was configured following Nreal Official Guide (Quickstart for Android - NRSDK Documentation) and Unity version that I use was “Unity 2019.4.26f1”.

Does anyone have any idea about the issue ?