vb.net - RAW Data from embedded resource image -


I am trying to retrieve an image from an embedded resource, and display it in my raw data format I want (i.e. -> junk text data).

Actually, I'm walking in a wall with everything I try. Can anyone show me how to do it properly?

You can use the following

  System.Reflection. Assembly GetExecutingAssembly.GetManifestResourceStream (fileName)  

This will give you a stream that you can then use to convert to a byte array that has a lot of raw data.

  Bit () as a bit stream length (byte stream system .sstream) by GetStreamAsByteArray (convert to integer = convert). ToInt32 (stream.Length) Dim fileData bytes =) New bytes (StreamLength) {} 'file in a byte array stream. Read (File Data, 0, Stream Langhani) stream. Close () File File End Function  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -