android - How to decode data using Zxing C++ -


i'm having troubles using c++ sources zxing project. downloaded whole project https://code.google.com/p/zxing/downloads/list , took cpp files (core , cli).

i want have method that:

decode(byte[] datatodecode, int widthframe, int heightframe) 

but don't know how (i'm new c++ , zxing project).

i've done research on web , found http://wiki.ssrrsummerschool.org/doku.php?id=robocup2012:qrcode-cppexample needed.

unfortunately, zxing core has changed , have problems because of arrayref

is there easy way decode byte array (rgb) , return result string ?

help appreciated,

problem has been solved modifying bufferbitmapsource class example (http://wiki.ssrrsummerschool.org/doku.php?id=robocup2012:qrcode-cppexample) according zxing library 2.2.

bufferbitmapsource.hpp:

#include <zxing/luminancesource.h> #include <stdio.h> #include <stdlib.h> using namespace zxing;  namespace qrviddec {  class bufferbitmapsource : public luminancesource { private:   arrayref<char>* buffer;  public:   bufferbitmapsource(int inwidth, int inheight, arrayref<char> buffer);   ~bufferbitmapsource();     arrayref<char> getrow(int y, arrayref<char> row) const;   arrayref<char> getmatrix() const; };  } 

bufferbitmapsource.cpp long post can share ask.

test.cpp (main)

... // convert buffer library understands. arrayref<char> data((char*)buffer, width*height); ref<luminancesource> source (new bufferbitmapsource(width, height, data)); ... 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -