If you do use this, watch out with large megapixel cameras, you'll want to
use this, otherwise
it could take minutes to decode the bitmap.
I fixed it by doing the following:
private byte[] convertArray(int[] array)
{
byte[] newarray = new byte[array.Length * 3];
for (int i = 0; i < array.Length; i++)
{
newarray[i * 3] = (byte)array[i];
newarray[i * 3 + 1] = (byte)(array[i] >> 8);
newarray[i * 3 + 2] = (byte)(array[i] >> 16);
}
return newarray;
}
int[] pixels = new int[_backBitmap.Width * _backBitmap.Height];
_backBitmap.GetPixels(pixels, 0, _backBitmap.Width, 0, 0, _backBitmap.Width,
_backBitmap.Height);
byte[] pixelArray = convertArray(pixels);
LuminanceSource source = new RGBLuminanceSource(pixelArray,
_backBitmap.Width, _backBitmap.Height);
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/ZXing-port-to-mono-for-Android-tp4840736p4845750.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid