System.TypeInitializationException: The type initializer for 'Gdip' threw an exception
<p>I want to create an application where I can capture an image with Black Background with an Object and pass the image path to the Algorithm to calculate the size of an object in the image.</p>

<p><strong>What we are doing:</strong> Capturing the image with Black Background with an Object.</p>

<p><strong>Algorithm:</strong> Algorithm is written in C# Windows compatibility mode. The algorithm remove the black color background and after cropping it returns the size of an Object using (System.Drawing dll).
The algorithm works fine in Desktop application.</p>

<p>We are trying to convert the Application in Xamarin Android. Where we find some issues during Runtime.</p>

<p><strong>Error:</strong> <strong>System.TypeInitializationException: The type initializer for 'Gdip' threw an exception. ---> System.EntryPointNotFoundException at System.Drawing.Bitmap..ctor (System.String filename ”</strong></p>

<pre><code>    var bmp = new Bitmap(App._file.Path); //App._file Path Path from camera image
    var filter = new Grayscale(0.2125, 0.7154, 0.0721);
    Bitmap grayImage = filter.Apply(bmp);
</code></pre>

<p>So what can I do to solve this problem?</p>