I noticed that Texture2D.LoadImage will return true regardless of whether the data passed to it contains valid image data. The resulting texture is a small red question-mark, but there doesn’t seem to be a way to actually check that LoadImage failed.
The same happens with WWW: I downloaded some JSON data, expecting WWW.texture to be null, but it wasn’t - and using that texture gave me the same question mark texture as before. Again, there’s apparently no way to check if the texture is valid.
Is there any way at all to check if some binary data contains valid image data without having to resort to external libraries?