3DiVi Face SDK  3.24.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
InternalImageBuffer.h
1 #ifndef __PBIO_API__PBIO__InternalImageBuffer_H_95c37b7db267489390b825c3535f4e88
2 #define __PBIO_API__PBIO__InternalImageBuffer_H_95c37b7db267489390b825c3535f4e88
3 
4 #include "SmartPtr.h"
5 #include "IRawImage.h"
6 #include "ComplexObject.h"
7 
8 namespace pbio
9 {
10 
11 class RawImage;
12 
25 class InternalImageBuffer : public ComplexObject
26 {
27 public:
28 
35 
43 
55  unsigned char* const data;
56 
66  const size_t data_buffer_size;
67 
74  const int width;
75 
82  const int height;
83 
90  const Format format;
91 
92 
93 private:
94 
95  static const int FORMAT_FLAG__DATA_IMAGET = 1 << 15;
96 
97  void const* const imagetptr_ptr;
98 
99 
101  const DHPtr &dll_handle,
102  void* impl,
103  unsigned char* data,
104  size_t data_buffer_size,
105  int width,
106  int height,
107  Format format,
108  void const* imagetptr_ptr)
109  : ComplexObject(dll_handle, impl)
110  , data(data)
111  , data_buffer_size(data_buffer_size)
112  , width(width)
113  , height(height)
114  , format(format)
115  , imagetptr_ptr(imagetptr_ptr)
116  {
117  // nothing else
118  }
119 
120 
121  friend class object_with_ref_counter<InternalImageBuffer>;
122  friend class RawImage;
123 };
124 
125 } // pbio namespace
126 
127 #endif // __PBIO_API__PBIO__InternalImageBuffer_H_95c37b7db267489390b825c3535f4e88
Struct that provides raw image data and optional cropping information.
Definition: RawImage.h:28
LightSmartPtr< InternalImageBuffer >::tPtr Ptr
Alias for the type of a smart pointer to InternalImageBuffer.
Definition: InternalImageBuffer.h:34
const Format format
Format of image data.
Definition: InternalImageBuffer.h:90
IRawImage - Raw image interface.
pbio::IRawImage::Format Format
Format of image data.
Definition: InternalImageBuffer.h:42
Definition: SmartPtr.h:84
Interface object that stores image data. Always create new InternalImageBuffer for every image or vid...
Definition: InternalImageBuffer.h:25
unsigned char *const data
Pointer to the image data buffer. All pixels must be stored continuously, row by row, without gaps at the end of each row.
Definition: InternalImageBuffer.h:55
SmartPtr.
const size_t data_buffer_size
Size of the data buffer.
Definition: InternalImageBuffer.h:66
const int height
Image height.
Definition: InternalImageBuffer.h:82
Format
Format of image data.
Definition: IRawImage.h:46
Struct that provides raw image data and optional cropping information.
Definition: RawImage.h:113
const int width
Image width.
Definition: InternalImageBuffer.h:74