Hi,
How can I use BilinearInterpolation in xamarin android I used some code follow bellow :
public static byte[] ToByteArray( Bitmap bmp)
{
byte[] bytes = null;
if (bmp != null)
{
using (MemoryStream stream = new MemoryStream())
{
if (bmp.Compress(Bitmap.CompressFormat.Jpeg, 100, stream))
{
bytes = stream.ToArray();
}
}
}
return bytes;
}
var newByteArray = ToByteArray(WLBitmap);
var data = Dicom.Imaging.Algorithms.BilinearInterpolation.RescaleColor24(newByteArray, bmpWidth, bmpHeight,newW, newH); //bmpWidth=512 , bmpHeight = 512 , newW = 3*512; newH=3*512;
but I have an error==> error: {System.IndexOutOfRangeException}
I am confuse really what should I do
Thanks