DDraceNetwork Docs
image_manipulation.cpp File Reference
#include "image_manipulation.h"
#include <base/math.h>
#include <base/system.h>
Include dependency graph for image_manipulation.cpp:

Functions

bool ConvertToRgba (uint8_t *pDest, const CImageInfo &SourceImage)
 
bool ConvertToRgbaAlloc (uint8_t *&pDest, const CImageInfo &SourceImage)
 
bool ConvertToRgba (CImageInfo &Image)
 
void ConvertToGrayscale (const CImageInfo &Image)
 
static void Dilate (int w, int h, const uint8_t *pSrc, uint8_t *pDest)
 
static void CopyColorValues (int w, int h, const uint8_t *pSrc, uint8_t *pDest)
 
void DilateImage (uint8_t *pImageBuff, int w, int h)
 
void DilateImage (const CImageInfo &Image)
 
void DilateImageSub (uint8_t *pImageBuff, int w, int h, int x, int y, int SubWidth, int SubHeight)
 
static float CubicHermite (float A, float B, float C, float D, float t)
 
static void GetPixelClamped (const uint8_t *pSourceImage, int x, int y, uint32_t W, uint32_t H, size_t BPP, uint8_t aSample[4])
 
static void SampleBicubic (const uint8_t *pSourceImage, float u, float v, uint32_t W, uint32_t H, size_t BPP, uint8_t aSample[4])
 
static void ResizeImage (const uint8_t *pSourceImage, uint32_t SW, uint32_t SH, uint8_t *pDestinationImage, uint32_t W, uint32_t H, size_t BPP)
 
uint8_t * ResizeImage (const uint8_t *pImageData, int Width, int Height, int NewWidth, int NewHeight, int BPP)
 
void ResizeImage (CImageInfo &Image, int NewWidth, int NewHeight)
 
int HighestBit (int OfVar)
 

Variables

static constexpr int DILATE_BPP = 4
 
static constexpr uint8_t DILATE_ALPHA_THRESHOLD = 10
 

Function Documentation

◆ ConvertToGrayscale()

void ConvertToGrayscale ( const CImageInfo Image)

◆ ConvertToRgba() [1/2]

bool ConvertToRgba ( CImageInfo Image)

◆ ConvertToRgba() [2/2]

bool ConvertToRgba ( uint8_t *  pDest,
const CImageInfo SourceImage 
)

◆ ConvertToRgbaAlloc()

bool ConvertToRgbaAlloc ( uint8_t *&  pDest,
const CImageInfo SourceImage 
)

◆ CopyColorValues()

static void CopyColorValues ( int  w,
int  h,
const uint8_t *  pSrc,
uint8_t *  pDest 
)
static

◆ CubicHermite()

static float CubicHermite ( float  A,
float  B,
float  C,
float  D,
float  t 
)
static

◆ Dilate()

static void Dilate ( int  w,
int  h,
const uint8_t *  pSrc,
uint8_t *  pDest 
)
static

◆ DilateImage() [1/2]

void DilateImage ( const CImageInfo Image)

◆ DilateImage() [2/2]

void DilateImage ( uint8_t *  pImageBuff,
int  w,
int  h 
)

◆ DilateImageSub()

void DilateImageSub ( uint8_t *  pImageBuff,
int  w,
int  h,
int  x,
int  y,
int  SubWidth,
int  SubHeight 
)

◆ GetPixelClamped()

static void GetPixelClamped ( const uint8_t *  pSourceImage,
int  x,
int  y,
uint32_t  W,
uint32_t  H,
size_t  BPP,
uint8_t  aSample[4] 
)
static

◆ HighestBit()

int HighestBit ( int  OfVar)

◆ ResizeImage() [1/3]

void ResizeImage ( CImageInfo Image,
int  NewWidth,
int  NewHeight 
)

◆ ResizeImage() [2/3]

uint8_t * ResizeImage ( const uint8_t *  pImageData,
int  Width,
int  Height,
int  NewWidth,
int  NewHeight,
int  BPP 
)

◆ ResizeImage() [3/3]

static void ResizeImage ( const uint8_t *  pSourceImage,
uint32_t  SW,
uint32_t  SH,
uint8_t *  pDestinationImage,
uint32_t  W,
uint32_t  H,
size_t  BPP 
)
static

◆ SampleBicubic()

static void SampleBicubic ( const uint8_t *  pSourceImage,
float  u,
float  v,
uint32_t  W,
uint32_t  H,
size_t  BPP,
uint8_t  aSample[4] 
)
static

Variable Documentation

◆ DILATE_ALPHA_THRESHOLD

constexpr uint8_t DILATE_ALPHA_THRESHOLD = 10
staticconstexpr

◆ DILATE_BPP

constexpr int DILATE_BPP = 4
staticconstexpr