Openholo  v5.0
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...
 

Static Public Member Functions

static ImgControlgetInstance ()
 

Detailed Description

Definition at line 40 of file ImgControl.h.

Member Function Documentation

◆ Crop()

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.

◆ Flip()

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()

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

Definition at line 50 of file ImgControl.h.

◆ GetSize()

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.

◆ Resize()

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.

◆ Rotate()

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.


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