If you are using Unity, then you have access to their API which does exactly what you need.
http://docs.unity3d.com/Documentation/ScriptReference/Texture2D.LoadImage.html http://docs.unity3d.com/Documentation/ScriptReference/Texture2D.GetPixels.html http://docs.unity3d.com/Documentation/ScriptReference/Texture2D.GetPixels32.html