c# - Convert a Bitmap to a Texture2D in Unity -


i'm in scenario i'm manipulating bitmaps using aforge.net in unity. however, bitmap can't applied texture in unity, visibly can see output, how done?

i believe have use memorystream, in fashion unknown me.

i managed achieve using memorystream, i.e.:

        memorystream msfinger = new memorystream();         bitmapcurrentframered.save(msfinger, bitmapcurrentframered.rawformat);         redcamera.loadimage(msfinger.toarray());         redfilter.getcomponent<renderer>().material.maintexture = redcamera; 

with bitmapcurrentframered being bitmap, redcamera being texture2d , redfilter being gameobject(plane) used view output.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -