#include <pxl_watermark.h>
Public Types | |
| enum | EmbedFlag { OutputPowerGraphForDebug = 1 } |
| enum | DetectFlags { DetectNonAlignedWms = 1 } |
| typedef SimpleArray< u8 > | Binary |
| typedef bool(* | DetectStatusCallback )(void *inContext, size_t inProgress, size_t inTotal) |
Static Public Member Functions | |
| static AutoPtr< Image > | embed (Image *inImage, const u8 *inData, size_t inDataSize, u32 inFlags, ExportUtils::JPEGExportParam *ioParam) |
| static bool | detect (Image *inImage, u32 inFlags, SimpleArray< Binary > &outBins, DetectStatusCallback inStatusCallback=NULL, void *inContext=NULL) |
Definition at line 21 of file pxl_watermark.h.
| typedef SimpleArray<u8> Celartem::Watermark::Binary |
An alias for SimpleArray<u8>.
Definition at line 26 of file pxl_watermark.h.
| typedef bool(* Celartem::Watermark::DetectStatusCallback)(void *inContext, size_t inProgress, size_t inTotal) |
This is the definition of the callback function used by detect function.
| inContext | The user defined parameter passed by detect function. | |
| inProgress | A number which indicates the current progress status. | |
| inTotal | The maximum value for the progress. |
true to continue the process. false to stop the process.
Flags to control the watermark embedding.
| OutputPowerGraphForDebug |
For debugging purpose only.
Additional flags for watermark embedding. |
Definition at line 31 of file pxl_watermark.h.
Flags to control the watermark detection.
Definition at line 82 of file pxl_watermark.h.
| static AutoPtr<Image> Celartem::Watermark::embed | ( | Image * | inImage, | |
| const u8 * | inData, | |||
| size_t | inDataSize, | |||
| u32 | inFlags, | |||
| ExportUtils::JPEGExportParam * | ioParam | |||
| ) | [static] |
This function embeds a watermark on the input image.
| inImage | The image on which the watermark is embedded. Unlike other functions in PixelLive SDK, this function statically create an instance of ImageUtils::ImageBuffer and works on it. The returned instance is nothing to do with the input image. | |
| inData | The data to embed. The data should be small enough to keep better image quality. It is recommended that the size should be smaller than 16 bytes. | |
| inDataSize | The size of inData in bytes. | |
| inFlags | Any combination of EmbedFlags enumeration values. | |
| ioParam | The JPEG related parameters which are used when the watermark is optimized for JPEG. |
| static bool Celartem::Watermark::detect | ( | Image * | inImage, | |
| u32 | inFlags, | |||
| SimpleArray< Binary > & | outBins, | |||
| DetectStatusCallback | inStatusCallback = NULL, |
|||
| void * | inContext = NULL | |||
| ) | [static] |
This function tries to detect watermarks on the input image.
| inImage | The image which might contain watermarks. | |
| inFlags | Any combination of DetectFlags enumeration values. | |
| outBins | The buffer which receives the watermarks detected on the image. | |
| inStatusCallback | The callback routine which is called periodically during the detection process. It can be NULL if no callback is needed. | |
| inContext | An user defined parameter that is passed to the callback function. |
ture if any watermarks detected; otherwise false.