Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 76418

How to load and image from Resources into a byte-array?

$
0
0

Hi all
I have a (hopefully :smirk:) simple question (I don’t have found an answer, that fit’s by my searches).

I work with Xamarin.Forms 1.4.1-Pre-1.
In my app, I have:

byte[] AvatarErfassung; // Bytearray, to later update the webservice
var Avatar = new Image { HeightRequest = 71, WidthRequest = 61, HorizontalOptions = LayoutOptions.Start };
Avatar.Source = "SymbolMann.jpg";  

where the image "SymbolMann.jpg” is included as project-ressource and showed on a page (without problems).
I now want to put the image in a byte-array to send it to our webservice.

Question:
How to get the image “SymbolMann.jpg” into the byte-array “AvatarErfassung” ?

Thanks for every answer.


Viewing all articles
Browse latest Browse all 76418

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>