imagingandcamerafws/imagingfws/ImageProcessor/inc/imageprocessoreffect.h
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @publishedAll 
       
    19  @released 
       
    20 */
       
    21 
       
    22 #ifndef __IMAGE_PROCESSOR_EFFECT_H__
       
    23 #define __IMAGE_PROCESSOR_EFFECT_H__
       
    24 
       
    25 #include <e32base.h>
       
    26 #include <imageprocessor/imageprocessor_uids.hrh>
       
    27 #include <imageprocessor/imageprocessor.h>
       
    28 
       
    29 namespace ImageProcessor
       
    30 	{
       
    31 	class CImageProcessorImpl;
       
    32 	
       
    33 	namespace Plugin
       
    34 		{
       
    35 		class MEffect;
       
    36 		}
       
    37    	
       
    38    	//Effects Uids
       
    39 	/** 
       
    40 	Uid used to gain access to the Sepia effect. @see ImageProcessor::CImgProcessor::EffectL
       
    41 	*/
       
    42 	const TUid KEffectSepiaUid = {KEffectSepiaUidValue};
       
    43 	/** 
       
    44 	Uid used to gain access to the Grayscale effect. @see ImageProcessor::CImgProcessor::EffectL
       
    45 	*/
       
    46 	const TUid KEffectGrayscaleUid = {KEffectGrayscaleUidValue};
       
    47 	/** 
       
    48 	Uid used to gain access to the Negative effect. @see ImageProcessor::CImgProcessor::EffectL
       
    49 	*/
       
    50 	const TUid KEffectNegativeUid = {KEffectNegativeUidValue};
       
    51 	/** 
       
    52 	Uid used to gain access to the GrayscaleNegative effect. @see ImageProcessor::CImgProcessor::EffectL
       
    53 	*/
       
    54 	const TUid KEffectGrayscaleNegativeUid = {KEffectGrayscaleNegativeUidValue};
       
    55 	/** 
       
    56 	Uid used to gain access to the Oily effect. @see ImageProcessor::CImgProcessor::EffectL
       
    57 	*/
       
    58 	const TUid KEffectOilyUid = {KEffectOilyUidValue};
       
    59 	/** 
       
    60 	Uid used to gain access to the Paint effect. @see ImageProcessor::CImgProcessor::EffectL
       
    61 	*/
       
    62 	const TUid KEffectPaintUid = {KEffectPaintUidValue};
       
    63 	/** 
       
    64 	Uid used to gain access to the Milky effect. @see ImageProcessor::CImgProcessor::EffectL
       
    65 	*/
       
    66 	const TUid KEffectMilkyUid = {KEffectMilkyUidValue};
       
    67 	/** 
       
    68 	Uid used to gain access to the Fog effect. @see ImageProcessor::CImgProcessor::EffectL
       
    69 	*/
       
    70 	const TUid KEffectFogUid = {KEffectFogUidValue};
       
    71 	/** 
       
    72 	Uid used to gain access to the MirrorLeftToRight effect. @see ImageProcessor::CImgProcessor::EffectL
       
    73 	*/
       
    74 	const TUid KEffectMirrorLeftToRightUid = {KEffectMirrorLeftToRightUidValue};
       
    75 	/** 
       
    76 	Uid used to gain access to the MagicPen effect. @see ImageProcessor::CImgProcessor::EffectL
       
    77 	*/
       
    78 	const TUid KEffectMagicPenUid = {KEffectMagicPenUidValue};
       
    79 	/** 
       
    80 	Uid used to gain access to the Brightness effect. @see ImageProcessor::CImgProcessor::EffectL
       
    81 	*/
       
    82 	const TUid KEffectBrightnessUid = {KEffectBrightnessUidValue};
       
    83 	/** 
       
    84 	Uid used to gain access to the Sharpness effect. @see ImageProcessor::CImgProcessor::EffectL
       
    85 	*/
       
    86 	const TUid KEffectSharpnessUid = {KEffectSharpnessUidValue};
       
    87 	/** 
       
    88 	Uid used to gain access to the Rotation effect. @see ImageProcessor::CImgProcessor::EffectL
       
    89 	*/
       
    90 	const TUid KEffectRotationUid = {KEffectRotationUidValue};
       
    91 	/** 
       
    92 	Uid used to gain access to the Contrast effect. @see ImageProcessor::CImgProcessor::EffectL
       
    93 	*/
       
    94 	const TUid KEffectContrastUid = {KEffectContrastUidValue};
       
    95 	/** 
       
    96 	Uid used to gain access to the RgbColorAdjust effect. @see ImageProcessor::CImgProcessor::EffectL
       
    97 	*/
       
    98 	const TUid KEffectRgbColorAdjustUid = {KEffectRgbColorAdjustUidValue};
       
    99 	/** 
       
   100 	Uid used to gain access to the Emboss effect. @see ImageProcessor::CImgProcessor::EffectL
       
   101 	*/
       
   102 	const TUid KEffectEmbossUid = {KEffectEmbossUidValue};
       
   103 	/** 
       
   104 	Uid used to gain access to the Solarize effect. @see ImageProcessor::CImgProcessor::EffectL
       
   105 	*/
       
   106 	const TUid KEffectSolarizeUid = {KEffectSolarizeUidValue};
       
   107 	/** 
       
   108 	Uid used to gain access to the Posterize effect. @see ImageProcessor::CImgProcessor::EffectL
       
   109 	*/
       
   110 	const TUid KEffectPosterizeUid = {KEffectPosterizeUidValue};
       
   111 	/** 
       
   112 	Uid used to gain access to the Stamp effect. @see ImageProcessor::CImgProcessor::EffectL
       
   113 	*/
       
   114 	const TUid KEffectStampUid = {KEffectStampUidValue};
       
   115 	/** 
       
   116 	Uid used to gain access to the Sketch effect. @see ImageProcessor::CImgProcessor::EffectL
       
   117 	*/
       
   118 	const TUid KEffectSketchUid = {KEffectSketchUidValue};
       
   119 	/** 
       
   120 	Uid used to gain access to the Noise effect. @see ImageProcessor::CImgProcessor::EffectL
       
   121 	*/
       
   122 	const TUid KEffectNoiseUid = {KEffectNoiseUidValue};
       
   123 	/** 
       
   124 	Uid used to gain access to the Moonlight effect. @see ImageProcessor::CImgProcessor::EffectL
       
   125 	*/
       
   126 	const TUid KEffectMoonlightUid = {KEffectMoonlightUidValue};
       
   127 	/** 
       
   128 	Uid used to gain access to the FrostedGlass effect. @see ImageProcessor::CImgProcessor::EffectL
       
   129 	*/
       
   130 	const TUid KEffectFrostedGlassUid = {KEffectFrostedGlassUidValue};
       
   131 	/** 
       
   132 	Uid used to gain access to the Despeckle effect. @see ImageProcessor::CImgProcessor::EffectL
       
   133 	*/
       
   134 	const TUid KEffectDespeckleUid = {KEffectDespeckleUidValue};
       
   135 	/** 
       
   136 	Uid used to gain access to the Blur effect. @see ImageProcessor::CImgProcessor::EffectL
       
   137 	*/
       
   138 	const TUid KEffectBlurUid = {KEffectBlurUidValue};
       
   139 	/** 
       
   140 	Uid used to gain access to the Colorization effect. @see ImageProcessor::CImgProcessor::EffectL
       
   141 	*/
       
   142 	const TUid KEffectColorizationUid = {KEffectColorizationUidValue};
       
   143 	/** 
       
   144 	Uid used to gain access to the Cartoon effect. @see ImageProcessor::CImgProcessor::EffectL
       
   145 	*/
       
   146 	const TUid KEffectCartoonUid = {KEffectCartoonUidValue};
       
   147 	/** 
       
   148 	Uid used to gain access to the LocalBoost effect. @see ImageProcessor::CImgProcessor::EffectL
       
   149 	*/
       
   150 	const TUid KEffectLocalBoostUid = {KEffectLocalBoostUidValue};
       
   151 	/** 
       
   152 	Uid used to gain access to the ColorBoost effect. @see ImageProcessor::CImgProcessor::EffectL
       
   153 	*/
       
   154 	const TUid KEffectColorBoostUid = {KEffectColorBoostUidValue};
       
   155 	/** 
       
   156 	Uid used to gain access to the WhiteBalance effect. @see ImageProcessor::CImgProcessor::EffectL
       
   157 	*/
       
   158 	const TUid KEffectWhiteBalanceUid = {KEffectWhiteBalanceUidValue};
       
   159 	/** 
       
   160 	Uid used to gain access to the AutoLevels effect. @see ImageProcessor::CImgProcessor::EffectL
       
   161 	*/
       
   162 	const TUid KEffectAutoLevelsUid = {KEffectAutoLevelsUidValue};
       
   163 	/** 
       
   164 	Uid used to gain access to the Levels effect. @see ImageProcessor::CImgProcessor::EffectL
       
   165 	*/
       
   166 	const TUid KEffectLevelsUid = {KEffectLevelsUidValue};
       
   167 	/** 
       
   168 	Uid used to gain access to the Exposure effect. @see ImageProcessor::CImgProcessor::EffectL
       
   169 	*/
       
   170 	const TUid KEffectExposureUid = {KEffectExposureUidValue};
       
   171 	/** 
       
   172 	Uid used to gain access to the SpotLight effect. @see ImageProcessor::CImgProcessor::EffectL
       
   173 	*/
       
   174 	const TUid KEffectSpotLightUid = {KEffectSpotLightUidValue};
       
   175 	/** 
       
   176 	Uid used to gain access to the CustomTransformation effect. @see ImageProcessor::CImgProcessor::EffectL
       
   177 	*/
       
   178 	const TUid KEffectCustomTransformationUid = {KEffectCustomTransformationUidValue};
       
   179 	/** 
       
   180 	Uid used to gain access to the Antique effect. @see ImageProcessor::CImgProcessor::EffectL
       
   181 	*/
       
   182 	const TUid KEffectAntiqueUid = {KEffectAntiqueUidValue};
       
   183 	
       
   184 	//Others
       
   185 	/** 
       
   186 	Uid used to gain access to the GeometricalOperation effect. @see ImageProcessor::CImgProcessor::EffectL
       
   187 	*/
       
   188 	const TUid KGeometricalOperationUid = {KGeometricalOperationUidValue};
       
   189 	/** 
       
   190 	Uid used to gain access to the Border effect. @see ImageProcessor::CImgProcessor::EffectL
       
   191 	*/
       
   192 	const TUid KEffectBorderUid = {KEffectBorderUidValue};
       
   193 	   
       
   194 /**
       
   195 The class is the parent class of all effects.
       
   196 The extended class should implement three stages/functions: "begin -> set -> end" 
       
   197 
       
   198 @publishedAll
       
   199 @released
       
   200 */
       
   201 class TEffect
       
   202 	{
       
   203 public:
       
   204 	/** Describes the type of the effect in terms of the type of parameter input to adjust levels. */
       
   205 	enum TEffectInputType
       
   206 		{
       
   207 		EEffectInputTypeInt,
       
   208 		EEffectInputTypeReal32,
       
   209 		EEffectInputTypeCustom
       
   210 		};
       
   211 
       
   212 public:
       
   213 	inline TUid Type() const;
       
   214 	inline Plugin::MEffect& PluginEffect() const;
       
   215 	inline TBool IsActive() const;
       
   216 	
       
   217 	IMPORT_C void BeginL();
       
   218 	IMPORT_C void EndL();
       
   219 	
       
   220 	IMPORT_C TEffectInputType InputType() const;
       
   221 	
       
   222 	IMPORT_C void SetLevelL(TInt aLevel);
       
   223 	IMPORT_C void LevelL(TInt& aLevel) const;
       
   224 	IMPORT_C void LevelSettings(TInt& aMinimumLevel, TInt& aMaximumLevel, TInt& aLevelStep) const;
       
   225 	
       
   226 	IMPORT_C void SetLevelL(TReal32 aLevel);
       
   227 	IMPORT_C void LevelL(TReal32& aLevel) const ;
       
   228 	IMPORT_C void LevelSettings(TReal32& aMinimumLevel, TReal32& aMaximumLevel, TReal32& aLevelStep) const;
       
   229 			
       
   230 	IMPORT_C void ResetL();
       
   231 	IMPORT_C TAny* Extension(TUid aExtension);
       
   232 
       
   233 protected:
       
   234 	friend class CImageProcessorImpl;
       
   235 	/**
       
   236 	@internalComponent
       
   237 	*/
       
   238 	TEffect(const TUid& aUid, Plugin::MEffect& aPluginEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   239 	Plugin::MEffect& iPluginEffect;
       
   240 	TUid iUid;
       
   241 	TBool iIsActive;
       
   242 	CImageProcessorImpl& iImageProcessorImpl;
       
   243 	
       
   244 	TAny* iReserved;
       
   245 	};
       
   246 
       
   247 /**
       
   248 Gets the effect type.
       
   249 
       
   250 @return The UID of the effect.
       
   251 */
       
   252 TUid TEffect::Type() const 
       
   253 	{	
       
   254 	return iUid;
       
   255 	}
       
   256 
       
   257 /**
       
   258 Gets associated plugin of the effect.
       
   259 
       
   260 @return A pointer to the related plugin effect instance.
       
   261 */
       
   262 Plugin::MEffect& TEffect::PluginEffect() const 
       
   263 	{	
       
   264 	return iPluginEffect;
       
   265 	}
       
   266 
       
   267 /**
       
   268 Gets the state of the effect.
       
   269 
       
   270 @return	ETrue if the effect is active.
       
   271 */
       
   272 TBool TEffect::IsActive() const 
       
   273 	{	
       
   274 	return iIsActive;
       
   275 	}
       
   276 
       
   277 /**
       
   278 The class provides functions to apply sepia effect to an image.
       
   279 
       
   280 @publishedAll
       
   281 @released
       
   282 */
       
   283 class TEffectSepia : public TEffect
       
   284 	{
       
   285 private:
       
   286 	friend class CImageProcessorImpl;
       
   287 	TEffectSepia(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   288 	};
       
   289 
       
   290 /**
       
   291 The class provides functions to convert an image to grayscale.
       
   292 
       
   293 @publishedAll
       
   294 @released
       
   295 */
       
   296 class TEffectGrayscale : public TEffect
       
   297 	{
       
   298 private:
       
   299 	friend class CImageProcessorImpl;
       
   300 	TEffectGrayscale(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   301 	};
       
   302 
       
   303 /**
       
   304 The class provides functions to convert an image similar to a photographic negative.
       
   305 
       
   306 @publishedAll
       
   307 @released
       
   308 */
       
   309 class TEffectNegative : public TEffect
       
   310 	{
       
   311 private:
       
   312 	friend class CImageProcessorImpl;
       
   313 	TEffectNegative(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   314 	};
       
   315 
       
   316 /**
       
   317 The class provides functions to convert an image to combined grayscale and negative. (Consider removing this effect)
       
   318 
       
   319 @publishedAll
       
   320 @released
       
   321 */
       
   322 class TEffectGrayscaleNegative : public TEffect
       
   323 	{
       
   324 private:
       
   325 	friend class CImageProcessorImpl;
       
   326 	TEffectGrayscaleNegative(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   327 	};
       
   328 
       
   329 /**
       
   330 The class provides functions to make an image look like an oil painting. 
       
   331 
       
   332 @publishedAll
       
   333 @released
       
   334 */
       
   335 class TEffectOily : public TEffect
       
   336 	{
       
   337 private:
       
   338 	friend class CImageProcessorImpl;
       
   339 	TEffectOily(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   340 	};
       
   341 
       
   342 /**
       
   343 The class provides functions to make an image look like a painting (how is this distinct from an oil painting effect?). 
       
   344 
       
   345 @publishedAll
       
   346 @released
       
   347 */
       
   348 class TEffectPaint : public TEffect
       
   349 	{
       
   350 private:
       
   351 	friend class CImageProcessorImpl;
       
   352 	TEffectPaint(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   353 	};
       
   354 
       
   355 /**
       
   356 The class provides functions to apply a "milky" surface effect to an image. 
       
   357 
       
   358 @publishedAll
       
   359 @released
       
   360 */
       
   361 class TEffectMilky : public TEffect
       
   362 	{
       
   363 private:
       
   364 	friend class CImageProcessorImpl;
       
   365 	TEffectMilky(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   366 	};
       
   367 
       
   368 /**
       
   369 The class provides functions to apply a fog effect to an image. 
       
   370 
       
   371 @publishedAll
       
   372 @released
       
   373 */
       
   374 class TEffectFog : public TEffect
       
   375 	{
       
   376 private:
       
   377 	friend class CImageProcessorImpl;
       
   378 	TEffectFog(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   379 	};
       
   380 
       
   381 /**
       
   382 The class provides functions to apply Antique effect to an image. 
       
   383 
       
   384 @publishedAll
       
   385 @released
       
   386 */
       
   387 class TEffectAntique : public TEffect
       
   388 	{
       
   389 private:
       
   390 	friend class CImageProcessorImpl;
       
   391 	TEffectAntique(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   392 	};
       
   393 
       
   394 /**
       
   395 The class provides functions to apply a mirror effect to an image. 
       
   396 Mirrors the left side of the image on the right side of the image. 
       
   397 
       
   398 @publishedAll
       
   399 @released
       
   400 */
       
   401 class TEffectMirrorLeftToRight : public TEffect
       
   402 	{
       
   403 private:
       
   404 	friend class CImageProcessorImpl;
       
   405 	TEffectMirrorLeftToRight(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   406 	};
       
   407 
       
   408 /**
       
   409 The class provides functions to apply a mix of edge distinction and color manipulation to an image.
       
   410 
       
   411 @publishedAll
       
   412 @released
       
   413 */
       
   414 class TEffectMagicPen : public TEffect
       
   415 	{
       
   416 private:
       
   417 	friend class CImageProcessorImpl;
       
   418 	TEffectMagicPen(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   419 	};
       
   420 
       
   421 /**
       
   422 The class provides functions to adjust the brightness level of an image.
       
   423 
       
   424 @publishedAll
       
   425 @released
       
   426 */
       
   427 class TEffectBrightness : public TEffect
       
   428 	{
       
   429 private:
       
   430 	friend class CImageProcessorImpl;
       
   431 	TEffectBrightness(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   432 	};
       
   433 
       
   434 /**
       
   435 The class provides functions to adjust the sharpness level of an image.
       
   436 
       
   437 @publishedAll
       
   438 @released
       
   439 */
       
   440 class TEffectSharpness : public TEffect
       
   441 	{
       
   442 private:
       
   443 	friend class CImageProcessorImpl;
       
   444 	TEffectSharpness(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   445 	};
       
   446 
       
   447 /**
       
   448 The class provides functions to rotate an image through an arbitrary angle.
       
   449 
       
   450 @publishedAll
       
   451 @released
       
   452 */
       
   453 class TEffectRotation : public TEffect
       
   454 	{
       
   455 public:	
       
   456 	/**
       
   457 	Parameters to control the scale of the image when rotation is applied
       
   458 	*/
       
   459 	enum TRotationScaleMode 
       
   460 		{
       
   461 		/** The image is not scaled when rotation is applied, which is the default mode*/
       
   462 		ERotationScaleModeIgnore,
       
   463 		/** The image will be rotated, and scaled to fit inside the margins of the original image*/
       
   464 		ERotationScaleModeFitInside,
       
   465 		/** The image will be rotated, and scaled to fully enclose the margins of the original image*/ 
       
   466 		ERotationScaleModeFitOutside
       
   467 		};
       
   468 
       
   469 	IMPORT_C TRotationScaleMode ScaleModeL() const;
       
   470 	IMPORT_C TReal32 AngleL() const;
       
   471 	IMPORT_C void SetRotationL(TRotationScaleMode aScaleMode, TReal32 aAngle);
       
   472 
       
   473 private:
       
   474 	friend class CImageProcessorImpl;
       
   475 	TEffectRotation(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   476 	};
       
   477 
       
   478 /**
       
   479 The class provides functions to apply contrast adjustment to an image.
       
   480 
       
   481 @publishedAll
       
   482 @released
       
   483 */
       
   484 class TEffectContrast : public TEffect
       
   485 	{
       
   486 private:
       
   487 	friend class CImageProcessorImpl;
       
   488 	TEffectContrast(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   489 	};
       
   490 
       
   491 /**
       
   492 The class provides functions to adjust the RGB color composition of an image 
       
   493 
       
   494 @publishedAll
       
   495 @released
       
   496 */
       
   497 class TEffectRgbColorAdjust : public TEffect
       
   498 	{
       
   499 public:	
       
   500 	IMPORT_C TReal32 RedLevelL() const;
       
   501 	IMPORT_C TReal32 GreenLevelL() const;
       
   502 	IMPORT_C TReal32 BlueLevelL() const;
       
   503 	IMPORT_C void SetRGBLevelL(TReal32 aRedLevel, TReal32 aGreenLevel, TReal32 aBlueLevel);
       
   504 
       
   505 private:
       
   506 	friend class CImageProcessorImpl;
       
   507 	TEffectRgbColorAdjust(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   508 	};
       
   509 
       
   510 /**
       
   511 The class provides functions to apply an emboss effect in grayscale to an image.
       
   512 
       
   513 @publishedAll
       
   514 @released
       
   515 */
       
   516 class TEffectEmboss : public TEffect
       
   517 	{
       
   518 private:
       
   519 	friend class CImageProcessorImpl;
       
   520 	TEffectEmboss(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   521 	};
       
   522 
       
   523 /**
       
   524 The class provides functions to apply a solarize look to an image.
       
   525 
       
   526 @publishedAll
       
   527 @released
       
   528 */
       
   529 class TEffectSolarize : public TEffect
       
   530 	{
       
   531 private:
       
   532 	friend class CImageProcessorImpl;
       
   533 	TEffectSolarize(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   534 	};
       
   535 
       
   536 /**
       
   537 The class provides functions to apply a posterize effect to an image. The number of colors is reduced.
       
   538 
       
   539 @publishedAll
       
   540 @released
       
   541 */
       
   542 class TEffectPosterize : public TEffect
       
   543 	{
       
   544 private:
       
   545 	friend class CImageProcessorImpl;
       
   546 	TEffectPosterize(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   547 	};
       
   548 
       
   549 /**
       
   550 The class provides functions to apply a rubber stamp effect. Result is a black/white image.
       
   551 
       
   552 @publishedAll
       
   553 @released
       
   554 */
       
   555 class TEffectStamp : public TEffect
       
   556 	{
       
   557 public:	
       
   558 	IMPORT_C TInt SmoothnessLevelL() const;
       
   559 	IMPORT_C TInt ThresholdLevelL() const;
       
   560 	IMPORT_C void SetStampLevelL(TInt aSmoothnessLevel, TInt aThresholdLevel);
       
   561 
       
   562 private:
       
   563 	friend class CImageProcessorImpl;
       
   564 	TEffectStamp(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   565 	};
       
   566 /**
       
   567 The class provides functions to create a sketched representation of an image.
       
   568 
       
   569 @publishedAll
       
   570 @released
       
   571 */
       
   572 class TEffectSketch : public TEffect
       
   573 	{
       
   574 public:
       
   575 	/**
       
   576 	Parameters to control the sketch mode.
       
   577 	*/
       
   578 	enum TSketchMode
       
   579 		{
       
   580 		/** Sketch the image in gray, which is the default mode*/
       
   581 		ESketchModeGray,
       
   582 		/** Sketch the image in color.*/
       
   583 		ESketchColor
       
   584 		};
       
   585 public:	
       
   586 	IMPORT_C TSketchMode SketchModeL() const;
       
   587 	IMPORT_C void SetSketchModeL(TSketchMode aLevel);
       
   588 
       
   589 private:
       
   590 	friend class CImageProcessorImpl;
       
   591 	TEffectSketch(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   592 	};
       
   593 
       
   594 /**
       
   595 The class provides functions to apply noise to an image
       
   596 
       
   597 @publishedAll
       
   598 @released
       
   599 */
       
   600 class TEffectNoise : public TEffect
       
   601 	{
       
   602 private:
       
   603 	friend class CImageProcessorImpl;
       
   604 	TEffectNoise(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   605 	};
       
   606 
       
   607 /**
       
   608 The class provides functions to apply a Moonlight effect to an image.
       
   609 
       
   610 @publishedAll
       
   611 @released
       
   612 */
       
   613 class TEffectMoonlight : public TEffect
       
   614 	{
       
   615 	TInt16 ClockL();
       
   616 	void SetClockL(TInt16 aClock);
       
   617 
       
   618 private:
       
   619 	friend class CImageProcessorImpl;
       
   620 	TEffectMoonlight(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   621 	};
       
   622 
       
   623 /**
       
   624 The class provides functions to apply a "frosted glass" surface effect to an image.
       
   625 
       
   626 @publishedAll
       
   627 @released
       
   628 */
       
   629 class TEffectFrostedGlass : public TEffect
       
   630 	{
       
   631 private:
       
   632 	friend class CImageProcessorImpl;
       
   633 	TEffectFrostedGlass(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   634 	};
       
   635 
       
   636 /**
       
   637 The class provides functions to apply a "despeckle" surface effect to an image, which means to 
       
   638 remove noise from images without blurring edges.
       
   639 
       
   640 @publishedAll
       
   641 @released
       
   642 */
       
   643 class TEffectDespeckle : public TEffect
       
   644 	{
       
   645 private:
       
   646 	friend class CImageProcessorImpl;
       
   647 	TEffectDespeckle(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   648 	};
       
   649 
       
   650 /**
       
   651 The class provides functions to blur an area of the image.
       
   652 
       
   653 @publishedAll
       
   654 @released
       
   655 */
       
   656 class TEffectBlur : public TEffect
       
   657 	{
       
   658 public:	
       
   659 	IMPORT_C TRect RectL() const;
       
   660 	IMPORT_C void SetRectL(TRect aRect);
       
   661 
       
   662 private:
       
   663 	friend class CImageProcessorImpl;
       
   664 	TEffectBlur(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   665 	};
       
   666 
       
   667 /**
       
   668 The class provides functions to adjust color tone and luminance/chrominance levels. 
       
   669 
       
   670 @publishedAll
       
   671 @released
       
   672 */
       
   673 class TEffectColorization : public TEffect
       
   674 	{
       
   675 public:	
       
   676 	IMPORT_C TRgb ReferenceColorL() const;
       
   677 	IMPORT_C TInt LuminanceStrengthL() const;
       
   678 	IMPORT_C TInt ChrominanceStrengthL() const;
       
   679 	IMPORT_C void SetColorizationL(TRgb aReferenceColor, TInt aLuminanceStrength, TInt aChrominanceStrength);
       
   680 
       
   681 private:
       
   682 	friend class CImageProcessorImpl;
       
   683 	TEffectColorization(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   684 	};
       
   685 
       
   686 /**
       
   687 The class provides functions to transform an image to typical cartoon graphics style.
       
   688 
       
   689 @publishedAll
       
   690 @released
       
   691 */
       
   692 class TEffectCartoon : public TEffect
       
   693 	{
       
   694 public:	
       
   695 	IMPORT_C TBool DistinctEdgesL() const;
       
   696 	IMPORT_C void SetDistinctEdgesL(TBool aDistinctEdges);
       
   697 
       
   698 private:
       
   699 	friend class CImageProcessorImpl;
       
   700 	TEffectCartoon(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   701 	};
       
   702 
       
   703 /**
       
   704 The class provides functions to automatically boost and enhance images with unequal illumination. 
       
   705 
       
   706 @publishedAll
       
   707 @released
       
   708 */
       
   709 class TEffectLocalBoost : public TEffect
       
   710 	{
       
   711 private:
       
   712 	friend class CImageProcessorImpl;
       
   713 	TEffectLocalBoost(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   714 	};
       
   715 
       
   716 /**
       
   717 The class provides functions to amplify the colors of an image.
       
   718 
       
   719 @publishedAll
       
   720 @released
       
   721 */
       
   722 class TEffectColorBoost : public TEffect
       
   723 	{
       
   724 private:
       
   725 	friend class CImageProcessorImpl;
       
   726 	TEffectColorBoost(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   727 	};
       
   728 
       
   729 /**
       
   730 The class provides functions to perform white balance adjustment on an image.
       
   731 
       
   732 @publishedAll
       
   733 @released
       
   734 */
       
   735 class TEffectWhiteBalance : public TEffect
       
   736 	{
       
   737 public:	
       
   738 	/**
       
   739 	Parameters to define the white balance modes.
       
   740 	*/
       
   741 	enum TWhiteBalanceMode
       
   742 		{
       
   743 		/**Uses the estimated mean gray for the color correction, which is the default mode.*/
       
   744 		EWhiteBalanceMeanMode,
       
   745 		/**Uses the estimated maximum intensity color.*/
       
   746 		EWhiteBalanceMaxMode,
       
   747 		/**Uses a white reference color. */
       
   748 		EWhiteBalanceManualMode,
       
   749 		/**Calulates the reference from the mean value of the 256-bin distribution.*/  
       
   750  		EWhiteBalanceClusterMode
       
   751 		};	
       
   752 		
       
   753 public:	
       
   754 	IMPORT_C TWhiteBalanceMode WhiteBalanceModeL() const;
       
   755 	IMPORT_C TRgb ReferenceWhiteColorL() const;
       
   756 	IMPORT_C void SetWhiteBalanceL(TWhiteBalanceMode aWhiteBalanceMode, TRgb aReferenceWhiteColor);
       
   757 	
       
   758 private:
       
   759 	friend class CImageProcessorImpl;
       
   760 	TEffectWhiteBalance(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   761 	};
       
   762 
       
   763 /**
       
   764 The class provides functions to apply auto level adjustment to an image.
       
   765 Auto level adjustment balances the intensity level of the image, for example making dark images lighter and vice versa.
       
   766 
       
   767 @publishedAll
       
   768 @released
       
   769 */
       
   770 class TEffectAutoLevels : public TEffect
       
   771 	{
       
   772 private:
       
   773 	friend class CImageProcessorImpl;
       
   774 	TEffectAutoLevels(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   775 	};
       
   776 
       
   777 /**
       
   778 The class provides functions to apply white, gray and black level adjustment to an image.
       
   779 
       
   780 @publishedAll
       
   781 @released
       
   782 */
       
   783 class TEffectLevels : public TEffect
       
   784 	{
       
   785 public:	
       
   786 	IMPORT_C TReal32 WhiteLevelL() const;
       
   787 	IMPORT_C TReal32 GrayLevelL() const;
       
   788 	IMPORT_C TReal32 BlackLevelL() const;
       
   789 	IMPORT_C void SetWGBLevelL(TReal32 aWhiteLevel, TReal32 aGrayLevel, TReal32 aBlackLevel);
       
   790 
       
   791 private:
       
   792 	friend class CImageProcessorImpl;
       
   793 	TEffectLevels(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   794 	};
       
   795 
       
   796 /**
       
   797 The class provides functions to control the exposure of an image.
       
   798 
       
   799 @publishedAll
       
   800 @released
       
   801 */
       
   802 class TEffectExposure : public TEffect
       
   803 	{
       
   804 private:
       
   805 	friend class CImageProcessorImpl;
       
   806 	TEffectExposure(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   807 	};
       
   808 
       
   809 /**
       
   810 The class provides functions to create a spotlight on an image.
       
   811 
       
   812 @publishedAll
       
   813 @released
       
   814 */
       
   815 class TEffectSpotLight : public TEffect
       
   816 	{
       
   817 public:	
       
   818 	IMPORT_C void SpotLightOrientationL(TPoint &aPosition, TUint32& aRadius, TReal32& aTransitionSize) const;
       
   819 	IMPORT_C void SetSpotLightOrientationL(const TPoint& aPosition, TUint32 aRadius, TReal32 aTransitionSize);
       
   820 
       
   821 private:
       
   822 	friend class CImageProcessorImpl;
       
   823 	TEffectSpotLight(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   824 	};
       
   825 
       
   826 /**
       
   827 The class provides functions to make a custom transformation with an image.
       
   828 
       
   829 @publishedAll
       
   830 @released
       
   831 */
       
   832 class TEffectCustomTransformation : public TEffect
       
   833 	{
       
   834 public:	
       
   835 	IMPORT_C void SetInputL(const TDesC& aFilename);
       
   836 	IMPORT_C void SetInputL(const TDesC8& aBuffer);
       
   837 
       
   838 private:
       
   839 	friend class CImageProcessorImpl;
       
   840 	TEffectCustomTransformation(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   841 	};
       
   842 
       
   843 /**
       
   844 The class provides functions to geometrically control an image.
       
   845 
       
   846 @publishedAll
       
   847 @released
       
   848 */
       
   849 class TGeometricalOperation : public TEffect
       
   850 	{
       
   851 public:	
       
   852 	IMPORT_C CImgProcessor::TOperation Operation() const;
       
   853 	IMPORT_C void SetOperationL(CImgProcessor::TOperation aOperation);
       
   854 
       
   855 private:
       
   856 	friend class CImageProcessorImpl;
       
   857 	TGeometricalOperation(Plugin::MEffect& aEffect,CImageProcessorImpl& aImageProcessorImpl);
       
   858 	};
       
   859 
       
   860 /**
       
   861 The class provides functions to insert a border to an image. 
       
   862 The border file can be input as File, Buffer or Bitmap. 
       
   863 
       
   864 @publishedAll
       
   865 @released
       
   866 */
       
   867 class TEffectBorder : public TEffect
       
   868 	{
       
   869 public:	
       
   870 	IMPORT_C void SetInputL(const TDesC& aFilename);
       
   871 	IMPORT_C void SetInputL(const TDesC8& aBuffer);
       
   872 	IMPORT_C void SetInputL(const CFbsBitmap& aBitmap);
       
   873 	
       
   874 private:
       
   875 	friend class CImageProcessorImpl;
       
   876 	TEffectBorder(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
       
   877 	};
       
   878 
       
   879 	}//namespace ImageProcessor
       
   880 
       
   881 #endif //__IMAGE_PROCESSOR_EFFECT_H__