0

I am trying to find the equivalent of System.Drawing for Android.

As I found Converting UIImage to Byte Array but this seems to be only being used for iOS and within the xamarin docs is not much usefull to find http://androidapi.xamarin.com/?link=root%3a%2fmono-libs

The only thing I try to accomplish is to convert an image to an byte[]

I know ho to use this:

using (Stream stream = httpWebReponse.GetResponseStream())
            {
                image = Image.FromStream(stream);
                ImageConverter _imageConverter = new ImageConverter();
                bytes = (Byte[])_imageConverter.ConvertTo(image, typeof(Byte[]));
                height = image.Height;
                width = image.Width;
                size = image.Size;
            }

Also a possibillity for me is to get the image and being able to post it in an submit form to WS. In other words if I am able the get the whole image and post this I would be also happy. IF something is unclear let me know.

Community
  • 1
  • 1
user3763117
  • 327
  • 1
  • 5
  • 18

1 Answers1

1

Take a look at the Android.Graphics namespace.

tequila slammer
  • 2,821
  • 1
  • 18
  • 25