iipsrv 1.3
iipsrv is an advanced high-performance feature-rich image server for web-based streamed viewing and zooming of ultra high-resolution images
Watermark Class Reference

Watermark class. More...

#include <Watermark.h>

Public Member Functions

 Watermark ()
 Constructor.
 
 Watermark (const std::string &file, float opacity, float probability)
 Constructor.
 
 ~Watermark ()
 Destructor.
 
void apply (void *data, unsigned int width, unsigned int height, unsigned int channels, unsigned int bpc, unsigned int block=0)
 Apply the watermark to a data buffer.
 
std::string getImage ()
 Return watermark image path.
 
float getOpacity ()
 Return watermark opacity.
 
float getProbability ()
 Return watermark probability.
 
void init ()
 Initialize our watermark image.
 
bool isSet ()
 Determine whether a watermark has been specified.
 

Detailed Description

Watermark class.

Constructor & Destructor Documentation

◆ Watermark()

Watermark::Watermark ( const std::string &  file,
float  opacity,
float  probability 
)
inline

Constructor.

Parameters
fileimage file path
opacityopacity applied to watermark
probabilityprobability (in range 0.0 -> 1.0) that watermark will be applied to a particular tile

Member Function Documentation

◆ apply()

void Watermark::apply ( void *  data,
unsigned int  width,
unsigned int  height,
unsigned int  channels,
unsigned int  bpc,
unsigned int  block = 0 
)

Apply the watermark to a data buffer.

Parameters
databuffer of image data
widthtile width
heighttile height
channelsnumber of channels
bpcbits per channel (8 or 16)
blocksize in pixels of square block size used for watermark tiling (optional). By default image size is used and only a single watermark applied

Referenced by CVT::send(), and JTL::send().


The documentation for this class was generated from the following files: