How to create an image from byte array and display it?

I am able to get the pixel information, but nothing ever displays on the screen. How do I actually get the image to display?

    pcxFile = File.ReadAllBytes("Assets/5_ImageParser/bagit_icon.pcx");
    int startPoint = 128;

    int height = 152; 
    int width = 152; 
    target = new Texture2D(height, width);

    for (var y = 0; y < height; y++)
    {
        for (var x = 0; x < width; x++)
        {
            timesDone ++;

            pixels[x, y] = new Color(pcxFile[startPoint], pcxFile[startPoint+1], pcxFile[startPoint+2]);

            startPoint += 4;

            target.SetPixel(x, y, pixels[x, y]);
        }	        
    }

    target.Apply();
    target.EncodeToJPG();

Hi
I think you need to do this

pcxFile = File.ReadAllBytes("Assets/5_ImageParser/bagit_icon.pcx");
     int startPoint = 128;
     int height = 152; 
     int width = 152; 
     target = new Texture2D(height, width);
     target .LoadRawTextureData(pcxFile);
     target.Apply();
     target.EncodeToJPG();