mirror of
https://github.com/zxing/zxing.git
synced 2024-11-11 13:34:08 -08:00
3ca1966aa2
git-svn-id: https://zxing.googlecode.com/svn/trunk@1341 59b500cc-1b3d-0410-9834-0bbf25fbcc57
33 lines
707 B
C++
33 lines
707 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();
|
|
|
|
private:
|
|
QImage image;
|
|
};
|
|
|
|
#endif //CAMERAIMAGE_H
|