Trying to find size in pixel of plane

I am trying to find the size in pixels of a displayed mesh.

 Debug.Log("BOUNDS" + renderer.bounds);

        Vector2 p1 = camera.WorldToScreenPoint(renderer.bounds.center - renderer.bounds.extents / 2.0f);
        Vector2 p2 = camera.WorldToScreenPoint(renderer.bounds.center + renderer.bounds.extents / 2.0f);

        Debug.Log("p1" + p1 + " p2" + p2 + " size " + (p2 - p1).ToString());

but the size seems wrong.

For example if the object is filling the width of a 400x400 screen I am getting the width to be 305

Thanks in advance for any help

*this is for a perspective camera…

also realized extents is 1/2 the size but still seems wrong

 Debug.Log("BOUNDS" + renderer.bounds);
        Vector2 p1 = camera.WorldToScreenPoint(renderer.bounds.center - renderer.bounds.extents);
        Vector2 p2 = camera.WorldToScreenPoint(renderer.bounds.center + renderer.bounds.extents);
        Debug.Log("p1" + p1 + " p2" + p2 + " size " + (p2 - p1).ToString());

Nevermind - the above is actually correct!

Game window was scaling resolution and I wasn’t paying attention…