zxing/symbian/QQrDecoder/CameraImageWrapper.h
ftylitak@gmail.com e1aab01022 Updated Symbian project QQrDecoder. It now supports the latest devices and Symbian OSs (Symbian^3, Belle, Anna).
Uses Qt SDK + Camera APIs from Qt Mobility.

Updated the tutorial which shows how to use it.

Updated the installation file included to test without compiling (also advice the tutorial for details).

git-svn-id: https://zxing.googlecode.com/svn/trunk@1920 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2011-09-19 10:32:17 +00:00

40 lines
950 B
C++

#ifndef CAMERAIMAGE_H
#define CAMERAIMAGE_H
#include <QImage>
#include <QString>
#include <zxing/LuminanceSource.h>
using namespace zxing;
class CameraImageWrapper : public LuminanceSource
{
public:
CameraImageWrapper();
CameraImageWrapper(CameraImageWrapper& otherInstance);
~CameraImageWrapper();
int getWidth() const;
int getHeight() const;
unsigned char getPixel(int x, int y) const;
unsigned char* copyMatrix() const;
void setImage(QString fileName);
void setImage(QImage newImage);
QImage grayScaleImage(QImage::Format f);
QImage getOriginalImage();
// Callers take ownership of the returned memory and must call delete [] on it themselves.
unsigned char* getRow(int y, unsigned char* row);
unsigned char* getMatrix();
private:
QImage image;
unsigned char* pRow;
unsigned char* pMatrix;
};
#endif //CAMERAIMAGE_H