# Changes 0.2.4-1
- Add GIT_BRANCH (for development and stable) - Write Documentation of - pd-core (exept of vec.hpp) - pd-app - pd-drivers - pd-lib3ds - pd-image - pd-image - pd-ui7
This commit is contained in:
@ -28,28 +28,41 @@ SOFTWARE.
|
||||
#include <pd/core/vec.hpp>
|
||||
|
||||
namespace PD {
|
||||
/**
|
||||
* Namepace containing functions to blur images
|
||||
*/
|
||||
namespace ImgBlur {
|
||||
/**
|
||||
* Function to create Gaussian Kernel List
|
||||
* @param radius Rasius to use
|
||||
* @param si sigma value to use
|
||||
* @return list of kernel values
|
||||
*/
|
||||
std::vector<float> GaussianKernel(int radius, float si);
|
||||
/// @brief Gaussian Blur for basic Image Buffer
|
||||
/// @param buf Image Buffer (unsigned char)
|
||||
/// @param w // width of the image
|
||||
/// @param h // width of the image
|
||||
/// @param radius // Blur radius
|
||||
/// @param si // Blur sigma
|
||||
/// @param idxfn // Indexing function (if buffer is 3ds tiled)
|
||||
/**
|
||||
* Gaussian Blur for basic Image Buffer
|
||||
* @param buf Image Buffer (unsigned char)
|
||||
* @param w width of the image
|
||||
* @param h width of the image
|
||||
* @param radius Blur radius
|
||||
* @param si Blur sigma
|
||||
* @param idxfn Indexing function
|
||||
*/
|
||||
void GaussianBlur(
|
||||
std::vector<u8> &buf, int w, int h, float radius, float si,
|
||||
std::function<int(int, int, int)> idxfn = [](int x, int y, int w) -> int {
|
||||
return y * w + x;
|
||||
});
|
||||
/// @brief Advanced func to access memory directly
|
||||
/// @param buf Referenvce to the buffer
|
||||
/// @param w // width of the image
|
||||
/// @param h // width of the image
|
||||
/// @param bpp Bytes per Pixels (RGB[A], RGB565, etc)
|
||||
/// @param radius // Blur radius
|
||||
/// @param si // Blur sigma
|
||||
/// @param idxfn // Indexing function (if buffer is 3ds tiled)
|
||||
/**
|
||||
* Advanced func to access memory directly
|
||||
* @param buf Referenvce to the buffer
|
||||
* @param w width of the image
|
||||
* @param h width of the image
|
||||
* @param bpp Bytes per Pixels (RGB[A], RGB565, etc)
|
||||
* @param radius Blur radius
|
||||
* @param si Blur sigma
|
||||
* @param idxfn Indexing function
|
||||
*/
|
||||
void GaussianBlur(
|
||||
void *buf, int w, int h, int bpp, float radius, float si,
|
||||
std::function<int(int, int, int)> idxfn = [](int x, int y, int w) -> int {
|
||||
|
@ -27,13 +27,26 @@ SOFTWARE.
|
||||
#include <pd/core/common.hpp>
|
||||
|
||||
namespace PD {
|
||||
/**
|
||||
* Namespace containing function to convert images
|
||||
*/
|
||||
namespace ImgConvert {
|
||||
/**
|
||||
* Convert RGB24 to RGBA32 by adding a 4th alpha value set to 255
|
||||
* to every pixel
|
||||
* @param out Result List
|
||||
* @param in Input Buffer List (rgb24)
|
||||
* @param w width of the image
|
||||
* @param h height of the image
|
||||
*/
|
||||
void RGB24toRGBA32(std::vector<u8> &out, const std::vector<u8> &in,
|
||||
const int &w, const int &h);
|
||||
/// @brief Reverse 32 (RGBA -> ABGR || ABGR -> RGBA)
|
||||
/// @param buf Buffer to convert
|
||||
/// @param w width
|
||||
/// @param h height
|
||||
/**
|
||||
* Reverse 32 (RGBA -> ABGR || ABGR -> RGBA)
|
||||
* @param buf Buffer to convert
|
||||
* @param w width
|
||||
* @param h height
|
||||
*/
|
||||
void Reverse32(std::vector<u8> &buf, const int &w, const int &h);
|
||||
} // namespace ImgConvert
|
||||
} // namespace PD
|
Reference in New Issue
Block a user