Openholo  v4.2
Open Source Digital Holographic Library
oph::ImgControl Class Reference

#include <ImgControl.h>

Public Member Functions

bool GetSize (const char *path, uint32_t *size)
 Get file size. More...
 
bool Resize (const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint32_t neww, const uint32_t newh, const uint8_t ch)
 Resize the bitmap. More...
 
bool Rotate (const double rotate, const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint32_t neww, const uint32_t newh, const uint8_t ch)
 Rotate the bitmap. More...
 
bool Flip (FLIP mode, const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint8_t ch)
 Flip the bitmap. More...
 
bool Crop (const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint8_t ch, const uint32_t start_x, const uint32_t start_y, const uint32_t end_x, const uint32_t end_y)
 Crop the bitmap. More...
 
bool GetSize (const char *path, uint32_t *size)
 
bool Resize (const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint32_t neww, const uint32_t newh, const uint8_t ch)
 
bool Rotate (const double rotate, const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint32_t neww, const uint32_t newh, const uint8_t ch)
 
bool Flip (FLIP mode, const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint8_t ch)
 
bool Crop (const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint8_t ch, const uint32_t start_x, const uint32_t start_y, const uint32_t end_x, const uint32_t end_y)
 
bool GetSize (const char *path, uint32_t *size)
 
bool Resize (const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint32_t neww, const uint32_t newh, const uint8_t ch)
 
bool Rotate (const double rotate, const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint32_t neww, const uint32_t newh, const uint8_t ch)
 
bool Flip (FLIP mode, const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint8_t ch)
 
bool Crop (const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint8_t ch, const uint32_t start_x, const uint32_t start_y, const uint32_t end_x, const uint32_t end_y)
 
bool GetSize (const char *path, uint32_t *size)
 
bool Resize (const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint32_t neww, const uint32_t newh, const uint8_t ch)
 
bool Rotate (const double rotate, const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint32_t neww, const uint32_t newh, const uint8_t ch)
 
bool Flip (FLIP mode, const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint8_t ch)
 
bool Crop (const uint8_t *src, uint8_t *dst, const uint32_t w, const uint32_t h, const uint8_t ch, const uint32_t start_x, const uint32_t start_y, const uint32_t end_x, const uint32_t end_y)
 

Static Public Member Functions

static ImgControlgetInstance ()
 
static ImgControlgetInstance ()
 
static ImgControlgetInstance ()
 
static ImgControlgetInstance ()
 

Detailed Description

Definition at line 40 of file ImgControl.h.

Member Function Documentation

◆ Crop() [1/4]

bool ImgControl::Crop ( const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint8_t  ch,
const uint32_t  start_x,
const uint32_t  start_y,
const uint32_t  end_x,
const uint32_t  end_y 
)

Crop the bitmap.

Parameters
src: [in] source pixel buffer
dst: [out] destination pixel buffer
w: [in] source bitmap width
h: [in] source bitmap height
ch: [in] bitmap channel
start_x: [in] crop start offset x
start_y: [in] crop start offset y
end_x: [in] crop end offset x
end_y: [in] crop end offset y
Returns
success: true, fail: false

Definition at line 265 of file ImgControl.cpp.

◆ Crop() [2/4]

bool oph::ImgControl::Crop ( const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint8_t  ch,
const uint32_t  start_x,
const uint32_t  start_y,
const uint32_t  end_x,
const uint32_t  end_y 
)

◆ Crop() [3/4]

bool oph::ImgControl::Crop ( const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint8_t  ch,
const uint32_t  start_x,
const uint32_t  start_y,
const uint32_t  end_x,
const uint32_t  end_y 
)

◆ Crop() [4/4]

bool oph::ImgControl::Crop ( const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint8_t  ch,
const uint32_t  start_x,
const uint32_t  start_y,
const uint32_t  end_x,
const uint32_t  end_y 
)

◆ Flip() [1/4]

bool oph::ImgControl::Flip ( FLIP  mode,
const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint8_t  ch 
)

◆ Flip() [2/4]

bool oph::ImgControl::Flip ( FLIP  mode,
const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint8_t  ch 
)

◆ Flip() [3/4]

bool oph::ImgControl::Flip ( FLIP  mode,
const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint8_t  ch 
)

◆ Flip() [4/4]

bool ImgControl::Flip ( FLIP  mode,
const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint8_t  ch 
)

Flip the bitmap.

Parameters
rotate: [in] flip mode.
src: [in] source pixel buffer
dst: [out] destination pixel buffer
w: [in] source bitmap width
h: [in] source bitmap height
ch: [in] bitmap channel
Returns
success: true, fail: false

Definition at line 203 of file ImgControl.cpp.

◆ getInstance() [1/4]

static ImgControl* oph::ImgControl::getInstance ( )
inlinestatic

Definition at line 50 of file ImgControl.h.

◆ getInstance() [2/4]

static ImgControl* oph::ImgControl::getInstance ( )
inlinestatic

Definition at line 50 of file ImgControl.h.

◆ getInstance() [3/4]

static ImgControl* oph::ImgControl::getInstance ( )
inlinestatic

Definition at line 50 of file ImgControl.h.

◆ getInstance() [4/4]

static ImgControl* oph::ImgControl::getInstance ( )
inlinestatic

Definition at line 50 of file ImgControl.h.

◆ GetSize() [1/4]

bool oph::ImgControl::GetSize ( const char *  path,
uint32_t *  size 
)

◆ GetSize() [2/4]

bool oph::ImgControl::GetSize ( const char *  path,
uint32_t *  size 
)

◆ GetSize() [3/4]

bool ImgControl::GetSize ( const char *  path,
uint32_t *  size 
)

Get file size.

Parameters
path: [in] file path
size: [out] file size
Returns
success: true, fail: false

Definition at line 300 of file ImgControl.cpp.

◆ GetSize() [4/4]

bool oph::ImgControl::GetSize ( const char *  path,
uint32_t *  size 
)

◆ Resize() [1/4]

bool oph::ImgControl::Resize ( const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint32_t  neww,
const uint32_t  newh,
const uint8_t  ch 
)

◆ Resize() [2/4]

bool oph::ImgControl::Resize ( const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint32_t  neww,
const uint32_t  newh,
const uint8_t  ch 
)

◆ Resize() [3/4]

bool ImgControl::Resize ( const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint32_t  neww,
const uint32_t  newh,
const uint8_t  ch 
)

Resize the bitmap.

Parameters
src: [in] source pixel buffer
dst: [out] destination pixel buffer
w: [in] source bitmap width
h: [in] source bitmap height
neww: [in] destination bitmap width
newh: [in] destination bitmap height
ch: [in] bitmap channel
Returns
success: true, fail: false

Definition at line 40 of file ImgControl.cpp.

◆ Resize() [4/4]

bool oph::ImgControl::Resize ( const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint32_t  neww,
const uint32_t  newh,
const uint8_t  ch 
)

◆ Rotate() [1/4]

bool oph::ImgControl::Rotate ( const double  rotate,
const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint32_t  neww,
const uint32_t  newh,
const uint8_t  ch 
)

◆ Rotate() [2/4]

bool oph::ImgControl::Rotate ( const double  rotate,
const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint32_t  neww,
const uint32_t  newh,
const uint8_t  ch 
)

◆ Rotate() [3/4]

bool ImgControl::Rotate ( const double  rotate,
const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint32_t  neww,
const uint32_t  newh,
const uint8_t  ch 
)

Rotate the bitmap.

Parameters
rotate: [in] rotate angle.
src: [in] source pixel buffer
dst: [out] destination pixel buffer
w: [in] source bitmap width
h: [in] source bitmap height
neww: [in] destination bitmap width
newh: [in] destination bitmap height
ch: [in] bitmap channel
Returns
success: true, fail: false

Definition at line 136 of file ImgControl.cpp.

◆ Rotate() [4/4]

bool oph::ImgControl::Rotate ( const double  rotate,
const uint8_t *  src,
uint8_t *  dst,
const uint32_t  w,
const uint32_t  h,
const uint32_t  neww,
const uint32_t  newh,
const uint8_t  ch 
)

The documentation for this class was generated from the following files: