svn-gvsig-desktop / trunk / libraries / libjni-mrsid / sdk / include / filters / lti_watermarkFilter.h @ 20023
History | View | Annotate | Download (3.04 KB)
1 |
/* $Id: lti_watermarkFilter.h 3539 2006-01-09 12:23:20Z nacho $ */
|
---|---|
2 |
/* //////////////////////////////////////////////////////////////////////////
|
3 |
// //
|
4 |
// This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
|
5 |
// Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
|
6 |
// prohibited. Access to and use of this code is permitted only under //
|
7 |
// license from LizardTech, Inc. Portions of the code are protected by //
|
8 |
// US and foreign patents and other filings. All Rights Reserved. //
|
9 |
// //
|
10 |
////////////////////////////////////////////////////////////////////////// */
|
11 |
/* PUBLIC */
|
12 |
|
13 |
#ifndef LTI_WATERMARKFILTER_H
|
14 |
#define LTI_WATERMARKFILTER_H
|
15 |
|
16 |
// lt_lib_mrsid_core
|
17 |
#include "lti_imageFilter.h" |
18 |
|
19 |
|
20 |
LT_BEGIN_NAMESPACE(LizardTech) |
21 |
|
22 |
#if defined(LT_COMPILER_MS)
|
23 |
#pragma warning(push,4) |
24 |
#endif
|
25 |
|
26 |
class LTIEmbeddedImage; |
27 |
|
28 |
/**
|
29 |
* insert a watermark image onto an image
|
30 |
*
|
31 |
* Inserts a watermark image onto the current image stage.
|
32 |
*/
|
33 |
class LTIWatermarkFilter : public LTIImageFilter |
34 |
{ |
35 |
public:
|
36 |
/**
|
37 |
* constructor
|
38 |
*
|
39 |
* Creates an image stage with the \a watermarkImage overlaid over the \a
|
40 |
* sourceImage at the position specified.
|
41 |
*
|
42 |
* The \a edgePadding argument is used to specify the distance (in pixels)
|
43 |
* between the watermark and the edge of the base image specified by the \a
|
44 |
* position argument. (This argument is ignored if LTI_POSITION_CENTER is
|
45 |
* used.)
|
46 |
*
|
47 |
* @param sourceImage the base image
|
48 |
* @param watermarkImage the watermark to be overlaid
|
49 |
* @param position where to insert the watermark
|
50 |
* @param edgePadding distance (in pixels) between the watermark and
|
51 |
* the base image
|
52 |
* @param takeOwnershipWM set to true to have the filter delete the \a watermarkImage
|
53 |
* @param takeOwnership set to true to have the filter delete the \a sourceImage
|
54 |
*/
|
55 |
LTIWatermarkFilter(LTIImageStage* sourceImage, |
56 |
LTIImageStage* watermarkImage, |
57 |
LTIPosition position, |
58 |
lt_uint32 edgePadding, |
59 |
bool takeOwnershipWM,
|
60 |
bool takeOwnership);
|
61 |
|
62 |
/**
|
63 |
* destructor
|
64 |
*/
|
65 |
virtual ~LTIWatermarkFilter(); |
66 |
|
67 |
virtual LT_STATUS initialize(); |
68 |
|
69 |
protected:
|
70 |
LT_STATUS decodeBegin(const LTIScene& scene);
|
71 |
LT_STATUS decodeEnd(); |
72 |
LT_STATUS decodeStrip(LTISceneBuffer& stripBuffer, const LTIScene& stripScene);
|
73 |
|
74 |
private:
|
75 |
typedef LTIImageFilter Super;
|
76 |
|
77 |
LT_STATUS checkImpedance() const;
|
78 |
|
79 |
LTIImageStage* m_rawWatermark; |
80 |
LTIEmbeddedImage* m_embeddedWatermark; |
81 |
lt_uint32 m_edgePadding; |
82 |
LTIPosition m_position; |
83 |
bool m_takeOwnershipWM;
|
84 |
|
85 |
// nope
|
86 |
LTIWatermarkFilter(const LTIWatermarkFilter&);
|
87 |
LTIWatermarkFilter& operator=(const LTIWatermarkFilter&);
|
88 |
}; |
89 |
|
90 |
|
91 |
LT_END_NAMESPACE(LizardTech) |
92 |
|
93 |
#if defined(LT_COMPILER_MS)
|
94 |
#pragma warning(pop)
|
95 |
#endif
|
96 |
|
97 |
#endif // LTI_WATERMARKFILTER_H |