Hello, I want to load in a Unity texture an image that I get from a dll, open with OpenCV. I actually just get the bytes array of an IplImage.imageData. This part works fine, and I can construct a new Texture2D using setPixels by reading the bytes array.
However, i would like to use Texture2D.LoadImage for studying its performance, but I can't fine how to use it well. In every case, I get a red question mark on my texture. I try to just send my byte array to load image, and for tests, I also try to use TextAsset, load a jpeg file with extension ".txt", like in many examples I've seen, but I still get my question mark.
What I would really like to know is what kind of data is expecting LoadImage. Thank you for your help.
asked Feb 22 '12 at 12:48 PM