I\'m using a zxing library in my iOS project. It\'s a library for reading and creating QR Codes.
From my researching and browsing around the web the process of decod
You don't want to print the values as characters because they aren't ASCII. Print them as unsigneds:
printf(" %u", ...);
You can simplify the loop to simply
result[i] = static_cast<unsigned char>(255 - result[i]);
The other conversions are normal integral promotion.
And you should note that ZXing uses some asymmetric heuristics when identifying codes. If you don't have a guard region surrounding the code that is, in this case, black (since the guard region is supposed to be white), it may fail to identify the code.