Im trying to get all bytes from a jpg file and manipulate it just as a fun practice. im getting each byte and subtracting it from 1 and then add that result to another byte array
    byte[] f = File.ReadAllBytes("aaa.jpg");
    byte[] fo = null;
    for(int i = 0;i<=f.Length;i++)
    {
        fo[i] = (byte)(f[i] - 1);
    }
    MessageBox.Show("done");
but im getting an error : Object reference not set to an instance of an object. its on line 5 and i don't really understand whats the problem
 
    