title: Unity texture2d getPixel return wrong color
body: <p>I'm loading png as a texture:</p>
  <pre><code> byte[] bytes = File.ReadAllBytes(path);
   Texture2D texture = new Texture2D(1, 1);
   texture.LoadImage(bytes);
  </code></pre>
  <p>The problem is with the pixel retrieved by <code>texture.GetPixel(23,23)</code></p>
  <p>In debug it seems to be white, debug log: <code>texture.GetPixel(23, 23) &quot;RGBA(1.000, 1.000, 1.000, 0.000)&quot;  UnityEngine.Color</code></p>
  <p>But it should be a kind of blue according to what I see in image:
  <a href="https://i.stack.imgur.com/VNnqS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VNnqS.png" alt="enter image description here" /></a></p>
  <p>I have no ideea how can I get the right value of this pixel.
  I put here photos with textures, and what I obtained drawing from pixel colors
  <a href="https://i.stack.imgur.com/PUdOh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PUdOh.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/k6gRq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k6gRq.png" alt="enter image description here" /></a></p>
  <p>Code used:</p>
  <pre><code>public void JustTest()
  {
      ClearGrid();
      byte[] bytes = File.ReadAllBytes(path);
      Texture2D texture = new Texture2D(1, 1);
      texture.LoadImage(bytes);
      for (int i = 0; i &lt;= texture.width; i++)
      {
          for (int j = 0; j &lt;= texture.height; j++)
          {
              GameObject sa = Instantiate(_testTilePrefab, new Vector3(i, 0.2f, j), _testTilePrefab.transform.rotation);
              sa.GetComponent&lt;Renderer&gt;().material.color = texture.GetPixel(i, j);
          }
      }
  }
  </code></pre>