Hello I am trying to use the Aforge library (also same problem in Accord ) to crop an image in xamarin that I took with the device camera, here is my code snippet
using Rectangle = System.Drawing.Rectangle;
using Image = System.Drawing.Image;
var mediaFile = await CrossMedia.Current.TakePhotoAsync(options);
Bitmap image = (Bitmap)Image.FromStream(mediaFile.GetStream());
Crop cropFilter = new Crop(Rectangle(170, 411, 1162, 723));
return cropFilter.Apply(image);
The problem is I am getting an ambiguous reference, I have no reference to system.drawing in my project
Severity Code Description Project File Line Suppression State
Error CS0433 The type 'Rectangle' exists in both
'Shim.Drawing, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d03c0bc8d64dbc'
and
'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'
Hello I am trying to use the Aforge library (also same problem in Accord ) to crop an image in xamarin that I took with the device camera, here is my code snippet
using Rectangle = System.Drawing.Rectangle;
using Image = System.Drawing.Image;
var mediaFile = await CrossMedia.Current.TakePhotoAsync(options);
Bitmap image = (Bitmap)Image.FromStream(mediaFile.GetStream());
Crop cropFilter = new Crop(Rectangle(170, 411, 1162, 723));
return cropFilter.Apply(image);
The problem is I am getting an ambiguous reference, I have no reference to system.drawing in my project
Severity Code Description Project File Line Suppression State
Error CS0433 The type 'Rectangle' exists in both
'Shim.Drawing, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d03c0bc8d64dbc'
and
'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'