|
zxing-cpp v3.0
|
#include <ImageView.h>
Inherited by ZXing::Image.
Public Member Functions | |
| ImageView ()=default | |
| ImageView (const uint8_t *data, int width, int height, ImageFormat format, int rowStride=0, int pixStride=0) | |
| ImageView (const uint8_t *data, int size, int width, int height, ImageFormat format, int rowStride=0, int pixStride=0) | |
| int | width () const |
| int | height () const |
| int | pixStride () const |
| int | rowStride () const |
| ImageFormat | format () const |
| const uint8_t * | data () const |
| const uint8_t * | data (int x, int y) const |
| ImageView | cropped (int left, int top, int width, int height) const |
| ImageView | rotated (int degree) const |
| ImageView | subsampled (int scale) const |
Simple class that stores a non-owning const pointer to image data plus layout and format information.
|
default |
ImageView default constructor creates a 'null' image view
|
inline |
|
inline |
ImageView constructor with bounds checking.
This constructor checks if the provided size is consistent with the width, height, row stride and pixel stride parameters to prevent out of bounds access when using the ImageView.
| data | pointer to image buffer |
| size | size of the image buffer in bytes |
| width | image width in pixels |
| height | image height in pixels |
| format | image/pixel format |
| rowStride | optional row stride in bytes, default is width * pixStride |
| pixStride | optional pixel stride in bytes, default is calculated from format |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Create a new ImageView that is a cropped version of this one. Negative width/height will be interpreted as "until the end of the line/image".
|
inline |
Create a new ImageView that is a rotated version of this one. Rotation is clockwise and only supports 90 degree steps.
|
inline |
Create a new ImageView that is a subsampled version of this one. The subsampled image will have width/height of original divided by scale.