I figured it out...
Here is the updated code:
var height = 100;
var width = 100;
var writer = new QRCodeWriter();
var matrix = writer.encode("http//www.google.com",
com.google.zxing.BarcodeFormat.QR_CODE, width, height);
Bitmap img = Bitmap.CreateBitmap(width, height,
Bitmap.Config.Argb8888);
for (int y = 0; y < matrix.Height; ++y)
{
for (int x = 0; x < matrix.Width; ++x)
{
if (matrix.get_Renamed(x, y) == -1)
{
img.SetPixel(x, y, Color.White);
}
else
{
img.SetPixel(x, y, Color.Black);
}
}
}
var imageView =
FindViewById<ImageView>(Resource.Id.QRCode);
imageView.SetImageBitmap(img);
Thanks,
Dan
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Get-Bitmap-from-QRCodeWriter-using-Zxing-Library-tp5711054p5711055.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