Pixel Byte-Array to Color32-Array (Combine ZXing with Vuforia)

Maybe someone can help me. I need a Color32 Array by calling GetPixels32(). Here is a good solution for an QR-Code Reader with webcam.
How to decode QR code using Unity3D

Vuforia can unfortunately only give a byte array with…

Image.PIXEL_FORMAT mPixelFormat = Image.PIXEL_FORMAT.RGB565;
Image cameraImage = CameraDevice.Instance.GetCameraImage(mPixelFormat);
byte[] pixels = cameraImage.Pixels;

Does anyone have any idea how I can make a Pixel byte array to an Color32 array?
Here is my question in the Vuforia Forum.

Maybe anyone have any other solutions for QR-Code decoding in Unity for Android and iOS.
I would be very grateful for your help.

Sorry to minunderstood the question.Pleas See Answers below by @whydoidoit


An inefficient way to change byte formated as RGB8888 to color:

Color32[] temp = new Color32[pixels.Length/4];
for (int i = 0; i < pixels.Length / 4;i++ )
{
    temp _= new Color32(pixels[i * 4 + 2], pixels[i * 4 + 1], pixels[i * 4], pixels[i * 4 + 3]);_
*} *

Right here you go:

 public Color32[] GetColorArray(byte[] rgb565Data)
 {
 if (rgb565Data.Length % 1 != 0) 
 throw new Exception("Must have an even length");
 
 var colors = new Color32[rgb565Data.Length / 2];
 
 for (var i = 0; i < rgb565Data.Length; i+=2)
 {
 colors[i / 2] = new Color32((byte)(rgb565Data *& 0xF8),*

(byte)(((rgb565Data & 7) << 5) | ((rgb565Data[i + 1] & 0xE0) >> 3)),
(byte)((rgb565Data[i + 1] & 0x1F) << 3),
(byte)1);
}

return colors;

}
Please see here for an article on using Vuforia and ZXing to decode barcodes and QR codes in a Unity game.

If you just want to get a picture from the (vuforia-)videostream as Texture2D (to read via GetPixels32()) you can simply take a screenshot:

Texture2D screenshot = new Texture2D(Screen.width, Screen.height, TextureFormat.RGBA32, false);
screenshot.ReadPixels(new Rect(0,0,Screen.width,Screen.height),0,0);
screenshot.Apply();
Color32[] color = screenshot.GetPixels32();

PS: I don’t know if it’s fast enough (or slower than converting byte to Color32)