 |
|
 |
I couldnt get to decode when its version is higher than 25 in byte mode.. its giving me error as invalid version number while decoding !!
And when mode is either numeric or alphanumeric,, decoded is message is all different from encoded message !!
Can anyone help me regarding this issue,, where to check for that encoding process in the given source code !!
Thnx in advance ^_^
|
|
|
|
 |
|
 |
The BCH (15,5) error correction is used to correct errors in reading the format information. It is very similar to the Reed-Solomon error codes used to correct the data of the QR code.
But this code is uses less (i.e. 32) codewords and the QR Code 2005 standard suggests using a look-up table instead of full BCH corrector.
|
|
|
|
 |
|
 |
As it is mentioned already on the forum, the RS ECC is not working properly.
Test: Generate a QR code, save it and try to decode it. In case of no errors all syndromes must be zero. That is checked in ReedSolomon.cd/correct() (lines 141-146). Set a breakpoint on line 147 and debug.
Result: The result of the check is not zero.
Comment: The first reason for this problem is just a bug: in the line 124 instead of MAXDEG must be NPAR. But even after fixing this bug the last syndrome is always no zero. This could be solved by changing line 151: instead of [j+1] there must be [j]. After this change all the syndromes will be OK but the rest of the code stops working
Explanation: The correction of +/-1 should be done in more place in the code. The original RS ECC implementation (ported to this project) assumes that the index of the generator polynomial starts from 1 (to 255), but in case of QR codes it starts from (0...254).
Solution: I would suggest to rework the code completely using as a scratch the code updated by Timothy B. Terriberry and used in ZBar QR project (see http://zbar.sourceforge.net/). This code works correct.
|
|
|
|
 |
|
 |
Thanks, I am struggling in generating barcode right now in ASP.NET
http://www.keepautomation.com
|
|
|
|
 |
|
|
 |
|
 |
Hi everyone,
Can someone help with the simple task of opening the solution in visual studio 2010?
I keep getting an error and 2 projects that fail to convert to visual studio 2010:
-QRCodeMobileLib.csproj
The project file ...\QRCode\QRCodeMobileLib\QRCodeMobileLib.csproj' cannot be opened. The project type is not supported by this installation.
-QRCodeWindowsMobile5.csproj
The project file ...\QRCode\QRCodeMobileLib\QRCodeWindowsMobile5.csproj' cannot be opened. The project type is not supported by this installation.
Help plzz
best regards
Bruno Rézio
|
|
|
|
 |
|
 |
Genera de nuevo el proyecto... Suele pasar eso en 2010 al pasar proyectos del 2008 o 2005.
Solo genera de nuevo el proyecto y anexale todos y cada uno de los archivos que contenía el proyecto anteriormente!
Saludos!!!
|
|
|
|
 |
|
|
 |
|
 |
First off - great work in providing this QR sample code. It worked first time for me and is really cool. Thanks. I want now to be able to add a small image to the centre of the QR code - the same image every time - say a small logo 32x32 pixels...Any suggestions on how this might be done?
|
|
|
|
 |
|
 |
This works perfectly for my needs! Thanks for taking the time to create this and make it available to everyone!
Clayton Rumley, B.Sc.
digifi inc.
http://www.digifi.ca
|
|
|
|
 |
|
 |
Hello there,
using the ThoughtWorks.QRCode.dll in order to read QR Codes.
I`ve seen 1 or 2 discussion about this problem already but they all end up talking about a bad encoding...
I am using another QR generator and I know that the QR code is generated right, since with other decoders (trial of commercial ones and even cell phone apps) those characters are showing.
any ideas?
Thanks.
|
|
|
|
 |
|
 |
MemoryStream memoryStream = new MemoryStream(Resources.GetResource(fileName));
中文情况下,返回乱码!
|
|
|
|
 |
|
|
 |
|
 |
just change for this:
//MemoryStream memoryStream = new MemoryStream(Resources.GetResource(fileName));
MemoryStream memoryStream = new MemoryStream((byte[])Resources.ResourceManager.GetObject(fileName));
|
|
|
|
 |
|
 |
I like to change the QRcode forground colour from black to blue ? Can anybody help me .Thanks a lot
|
|
|
|
 |
|
 |
Hi,
Thank you for a great component.
I came across an article on Image Manipulation (http://community.opennetcf.com/articles/cf/archive/2007/08/30/image-manipulation-in-windows-mobile-5.aspx[^]), written by Rob Miles. I used his technique to improve performance which helped a lot.
You can implement this in four steps.
1. Extend the QRCodeImage interface with a new method public int[][] GetPixels().
2. Implement the new method in QRCodeBitmapImage (see below)
3. Change the QRCodeDecoder.imageToIntArray (see below)
4. Build settings has to be changed to "Allow unsafe code".
Happy coding
Havardo
Implementation:
QRCodeDecoder.cs
internal virtual int[][] imageToIntArray(QRCodeImage image)
{
return image.GetPixels();
}
QRCodeBitmapImage.cs
using System.Drawing.Imaging;
public struct PixelData
{
public byte blue;
public byte green;
public byte red;
}
public int[][] GetPixels()
{
int width = image.Width;
int height = image.Height;
int[][] intImage = new int[width][];
for (int i = 0; i < width; i++)
{
intImage[i] = new int[height];
}
unsafe
{
BitmapData bd = image.LockBits(new Rectangle(0, 0, image.Width, image.Height),
ImageLockMode.ReadOnly,
PixelFormat.Format24bppRgb);
int sourceWidth = image.Width * System.Runtime.InteropServices.Marshal.SizeOf(typeof(PixelData));
if (sourceWidth % 4 != 0)
sourceWidth += (4 - (sourceWidth % 4));
Byte* bitmapBaseByte;
bitmapBaseByte = (Byte*)bd.Scan0.ToPointer();
PixelData* pPixel;
for (int y = 0; y < height; y++)
{
pPixel = (PixelData*)(bitmapBaseByte + y * sourceWidth);
for (int x = 0; x < width; x++)
{
intImage[x][y] = (int)((0xff << 0x18) | (pPixel->red << 0x10) | (pPixel->green << 8) | pPixel->blue);
pPixel++;
}
}
image.UnlockBits(bd);
}
return intImage;
}
|
|
|
|
 |
|
 |
There are 2 lines missing comparing the C# implementation and the reference implementation given for example in http://read.pudn.com/downloads61/sourcecode/java/212367/qrcode/src/jp/sourceforge/qrcode/codec/ecc/BCH15_5.java__.htm[^]
internal virtual int[] calcSyndrome(bool[] y)
{
int[] s = new int[5];
int[] p = new int[4];
int k;
for (k = 0; k < 15; k++)
{
if (y[k] == true)
{
for (int m = 0; m < 4; m++)
{
p[m] = (p[m] + gf16[k][m]) % 2;
}
}
}
k = searchElement(p);
s[0] = (k >= 15) ? -1 : k;
s[1] = (s[0] < 0) ? -1 : (s[0] * 2) % 15;
p = new int[4];
for (k = 0; k < 15; k++)
{
if (y[k] == true)
{
for (int m = 0; m < 4; m++)
{
p[m] = (p[m] + gf16[(k * 3) % 15][m]) % 2;
}
}
}
k = searchElement(p);
s[2] = (k >= 15) ? -1 : k;
s[3] = (s[1] < 0) ? -1 : (s[1] * 2) % 15;
p = new int[4];
for (k = 0; k < 15; k++)
{
if (y[k] == true)
{
for (int m = 0; m < 4; m++)
{
p[m] = (p[m] + gf16[(k * 5) % 15][m]) % 2;
}
}
}
k = searchElement(p);
s[4] = (k >= 15) ? -1 : k;
return s;
}
|
|
|
|
 |
|
 |
I get this message and cannot compile the dll...
"ThoughtWorks.QRCode.Properties.Resources does not contain a definition for GetResource"
Offending Code: MemoryStream memoryStream = new MemoryStream(Resources.GetResource(fileName));
QRCodeEncoder.cs, Line 453
Any thoughts?
Thx in advance
nassos
|
|
|
|
 |
|
 |
Well, whoever happens to have the same problem there is a workaround:
replace
Resources.GetResource(fileName)
with
(byte[])Resources.ResourceManager.GetObject(fileName, Resources.resourceCulture)
and make sure resourceCulture variable in Resources class is declared Internal.
Thank you for the great class library.
nassos
|
|
|
|
 |
|
 |
Instead of modifying each function call you could add the proper function to class "Resources" (file "Resources.Designer.cs below line 25):
internal static byte[] GetResource(string fileName)
{
return (byte[])ResourceManager.GetObject(fileName, Resources.resourceCulture);
}
Also line 204 of file "QrCodeSampleApp.Designer.cs" should be:
"24",
instead of
"40",
Nevertheless a great lib!
|
|
|
|
 |
|
 |
Great I had the same problem, but the reply you proffered aided out remaining one error which shows:
Error 3:
'ThoughtWorks.QRCode.Properties.Resources.resourceCulture' is inaccessible due to its protection level F:\Interra\VISUAL STUDIO\QRCode\QRCodeLib\QRCodeEncoder.cs 453 126 QRCodeLib
Am not too sure which protection level it's referring to. am using visual studio 2008 service pack 1.
great library.
|
|
|
|
 |
|
 |
MemoryStream memoryStream = new MemoryStream(Resources.GetResource(fileName));
|
|
|
|
 |
|
 |
Hey man! this post is awesome... thanks for your help!! But i have a doubt! wich one is the role of the version combo? where can in find documentation about that? thanks!
|
|
|
|
 |
|
 |
thanks a lot!i can't understand the function of file "qrv.dat","qrvfr.dat","rsc.dat",would someone help me
|
|
|
|
 |
|
 |
Hi
According to the source QrCodeEncoder.cs line 495:
/* -- read frame data -- */
it probably is the fixed part of the qrcode not containing data but the markers and alignment data etc.
So probable each dat file is a blank qrcode.
wvd_vegt
|
|
|
|
 |