DUNE: Uniform Navigational Environment
2017.01.0
|
Public Types | |
enum | ColorSpace { CS_GRAYSCALE, CS_RGB, CS_CMYK, CS_YUV } |
Public Member Functions | |
JPEGCompressor (void) | |
~JPEGCompressor (void) | |
JPEGCompressor & | setOptimize (bool optimize) |
JPEGCompressor & | setInputDimensions (uint32_t width, uint32_t height) |
JPEGCompressor & | setInputColorSpace (ColorSpace cspace) |
JPEGCompressor & | setOutputColorSpace (ColorSpace cspace) |
bool | compress (uint8_t *raw, uint8_t quality=90) |
const uint8_t * | imageData (void) const |
uint32_t | imageSize (void) const |
DUNE::Media::JPEGCompressor::JPEGCompressor | ( | void | ) |
Construct a JPEGCompressor object.
References DestinationManager::bfr, DestinationManager::bfr_size, DestinationManager::mgr, and setInputColorSpace().
DUNE::Media::JPEGCompressor::~JPEGCompressor | ( | void | ) |
Destroy a JPEGCompressor object.
References DestinationManager::bfr.
bool DUNE::Media::JPEGCompressor::compress | ( | uint8_t * | raw, |
uint8_t | quality = 90 |
||
) |
Compress a raw image in JPEG.
raw | raw image. |
quality | JPEG image quality. |
const uint8_t * DUNE::Media::JPEGCompressor::imageData | ( | void | ) | const |
uint32_t DUNE::Media::JPEGCompressor::imageSize | ( | void | ) | const |
Retrieve the size of the compressed image.
References DestinationManager::bfr_size, and DestinationManager::mgr.
JPEGCompressor & DUNE::Media::JPEGCompressor::setInputColorSpace | ( | ColorSpace | cspace | ) |
Set input color space.
cspace | color space. |
References CS_CMYK, CS_GRAYSCALE, CS_RGB, and CS_YUV.
Referenced by JPEGCompressor().
JPEGCompressor & DUNE::Media::JPEGCompressor::setInputDimensions | ( | uint32_t | width, |
uint32_t | height | ||
) |
Set dimensions of input image.
width | width of input image. |
height | height of input image. |
JPEGCompressor & DUNE::Media::JPEGCompressor::setOptimize | ( | bool | optimize | ) |
Set entropy encoding optimization.
optimize | true enables optimization. |
JPEGCompressor & DUNE::Media::JPEGCompressor::setOutputColorSpace | ( | ColorSpace | cspace | ) |
Set output image color space.
cspace | color space. |
References CS_CMYK, CS_GRAYSCALE, CS_RGB, and CS_YUV.