mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-24 15:15:38 +00:00
37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
|
// SPDX-License-Identifier: MIT
|
||
|
//
|
||
|
// EmulationStation Desktop Edition
|
||
|
// CImgUtil.h
|
||
|
//
|
||
|
// Utility functions using the CImg image processing library.
|
||
|
//
|
||
|
|
||
|
#ifndef ES_CORE_UTILS_CIMG_UTIL_H
|
||
|
#define ES_CORE_UTILS_CIMG_UTIL_H
|
||
|
|
||
|
// Disable the CImg display capabilities.
|
||
|
#define cimg_display 0
|
||
|
|
||
|
#include <CImg.h>
|
||
|
#include <vector>
|
||
|
|
||
|
namespace Utils
|
||
|
{
|
||
|
namespace CImg
|
||
|
{
|
||
|
void convertRGBAToCImg(std::vector<unsigned char> imageRGBA,
|
||
|
cimg_library::CImg<unsigned char>& image);
|
||
|
void convertCImgToRGBA(cimg_library::CImg<unsigned char> image,
|
||
|
std::vector<unsigned char>& imageRGBA);
|
||
|
void getTransparentPaddingCoords(cimg_library::CImg<unsigned char>& image,
|
||
|
int (&imageCoords)[4]);
|
||
|
void removeTransparentPadding(cimg_library::CImg<unsigned char>& image);
|
||
|
void cropLetterboxes(cimg_library::CImg<unsigned char>& image);
|
||
|
void cropPillarboxes(cimg_library::CImg<unsigned char>& image);
|
||
|
void addDropShadow(cimg_library::CImg<unsigned char>& image, unsigned int shadowDistance,
|
||
|
float transparency, unsigned int iterations);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#endif // ES_CORE_UTILS_CIMG_UTIL_H
|