Try this
http://windowqr.codeplex.com/SourceControl/list/changesets[
ZXING Sample Project]
Decoding
using com.google.zxing.qrcode;
using com.google.zxing;
using com.google.zxing.common;
public string Process(Bitmap bitmap)
{
try
{
com.google.zxing.LuminanceSource source = new RGBLuminanceSource(bitmap, bitmap.Width, bitmap.Height);
var binarizer = new HybridBinarizer(source);
var binBitmap = new BinaryBitmap(binarizer);
return reader.decode(binBitmap).Text;
}
catch
{
return string.Empty;
}
}
Encoding
QRCodeWriter writer = new QRCodeWriter();
Hashtable hints = new Hashtable();
hints.Add(EncodeHintType.ERROR_CORRECTION, com.google.zxing.qrcode.decoder.ErrorCorrectionLevel.M);
hints.Add("Version", "7");
ByteMatrix byteIMGNew = writer.encode("Hello", BarcodeFormat.QR_CODE, 350, 350, hints);
sbyte[][] imgNew = byteIMGNew.Array;
Bitmap bmp1 = new Bitmap(byteIMGNew.Width, byteIMGNew.Height);
Graphics g1 = Graphics.FromImage(bmp1);
g1.Clear(Color.White);
for (int i = 0; i <= imgNew.Length - 1; i++)
{
for (int j = 0; j <= imgNew[i].Length - 1; j++)
{
if (imgNew[j][i] == 0)
{
g1.FillRectangle(Brushes.Black, i, j, 1, 1);
}
else
{
g1.FillRectangle(Brushes.White, i, j, 1, 1);
}
}
}
bmp1.Save("D:\\QREncode.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);