52 unsigned int _channels;
70 unsigned char* _watermark;
88 Watermark(
const std::string& file,
float opacity,
float probability ){
95 _probability = probability;
102 if( _watermark )
delete[] _watermark;
112 void apply(
void* data,
unsigned int width,
unsigned int height,
unsigned int channels,
unsigned int bpc );
128 if( _isSet )
return true;
Watermark class.
Definition: Watermark.h:41
Watermark()
Constructor.
Definition: Watermark.h:76
void apply(void *data, unsigned int width, unsigned int height, unsigned int channels, unsigned int bpc)
Apply the watermark to a data buffer.
float getOpacity()
Return watermark opacity.
Definition: Watermark.h:118
~Watermark()
Destructor.
Definition: Watermark.h:101
float getProbability()
Return watermark probability.
Definition: Watermark.h:121
Watermark(const std::string &file, float opacity, float probability)
Constructor.
Definition: Watermark.h:88
bool isSet()
Determine whether a watermark has been specified.
Definition: Watermark.h:127
std::string getImage()
Return watermark image path.
Definition: Watermark.h:115
void init()
Initialize our watermark image.