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
Post a Comment