1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/imageprocessor/imageprocessoreffect.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,881 @@
1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +/**
1.20 + @file
1.21 + @publishedAll
1.22 + @released
1.23 +*/
1.24 +
1.25 +#ifndef __IMAGE_PROCESSOR_EFFECT_H__
1.26 +#define __IMAGE_PROCESSOR_EFFECT_H__
1.27 +
1.28 +#include <e32base.h>
1.29 +#include <imageprocessor/imageprocessor_uids.hrh>
1.30 +#include <imageprocessor/imageprocessor.h>
1.31 +
1.32 +namespace ImageProcessor
1.33 + {
1.34 + class CImageProcessorImpl;
1.35 +
1.36 + namespace Plugin
1.37 + {
1.38 + class MEffect;
1.39 + }
1.40 +
1.41 + //Effects Uids
1.42 + /**
1.43 + Uid used to gain access to the Sepia effect. @see ImageProcessor::CImgProcessor::EffectL
1.44 + */
1.45 + const TUid KEffectSepiaUid = {KEffectSepiaUidValue};
1.46 + /**
1.47 + Uid used to gain access to the Grayscale effect. @see ImageProcessor::CImgProcessor::EffectL
1.48 + */
1.49 + const TUid KEffectGrayscaleUid = {KEffectGrayscaleUidValue};
1.50 + /**
1.51 + Uid used to gain access to the Negative effect. @see ImageProcessor::CImgProcessor::EffectL
1.52 + */
1.53 + const TUid KEffectNegativeUid = {KEffectNegativeUidValue};
1.54 + /**
1.55 + Uid used to gain access to the GrayscaleNegative effect. @see ImageProcessor::CImgProcessor::EffectL
1.56 + */
1.57 + const TUid KEffectGrayscaleNegativeUid = {KEffectGrayscaleNegativeUidValue};
1.58 + /**
1.59 + Uid used to gain access to the Oily effect. @see ImageProcessor::CImgProcessor::EffectL
1.60 + */
1.61 + const TUid KEffectOilyUid = {KEffectOilyUidValue};
1.62 + /**
1.63 + Uid used to gain access to the Paint effect. @see ImageProcessor::CImgProcessor::EffectL
1.64 + */
1.65 + const TUid KEffectPaintUid = {KEffectPaintUidValue};
1.66 + /**
1.67 + Uid used to gain access to the Milky effect. @see ImageProcessor::CImgProcessor::EffectL
1.68 + */
1.69 + const TUid KEffectMilkyUid = {KEffectMilkyUidValue};
1.70 + /**
1.71 + Uid used to gain access to the Fog effect. @see ImageProcessor::CImgProcessor::EffectL
1.72 + */
1.73 + const TUid KEffectFogUid = {KEffectFogUidValue};
1.74 + /**
1.75 + Uid used to gain access to the MirrorLeftToRight effect. @see ImageProcessor::CImgProcessor::EffectL
1.76 + */
1.77 + const TUid KEffectMirrorLeftToRightUid = {KEffectMirrorLeftToRightUidValue};
1.78 + /**
1.79 + Uid used to gain access to the MagicPen effect. @see ImageProcessor::CImgProcessor::EffectL
1.80 + */
1.81 + const TUid KEffectMagicPenUid = {KEffectMagicPenUidValue};
1.82 + /**
1.83 + Uid used to gain access to the Brightness effect. @see ImageProcessor::CImgProcessor::EffectL
1.84 + */
1.85 + const TUid KEffectBrightnessUid = {KEffectBrightnessUidValue};
1.86 + /**
1.87 + Uid used to gain access to the Sharpness effect. @see ImageProcessor::CImgProcessor::EffectL
1.88 + */
1.89 + const TUid KEffectSharpnessUid = {KEffectSharpnessUidValue};
1.90 + /**
1.91 + Uid used to gain access to the Rotation effect. @see ImageProcessor::CImgProcessor::EffectL
1.92 + */
1.93 + const TUid KEffectRotationUid = {KEffectRotationUidValue};
1.94 + /**
1.95 + Uid used to gain access to the Contrast effect. @see ImageProcessor::CImgProcessor::EffectL
1.96 + */
1.97 + const TUid KEffectContrastUid = {KEffectContrastUidValue};
1.98 + /**
1.99 + Uid used to gain access to the RgbColorAdjust effect. @see ImageProcessor::CImgProcessor::EffectL
1.100 + */
1.101 + const TUid KEffectRgbColorAdjustUid = {KEffectRgbColorAdjustUidValue};
1.102 + /**
1.103 + Uid used to gain access to the Emboss effect. @see ImageProcessor::CImgProcessor::EffectL
1.104 + */
1.105 + const TUid KEffectEmbossUid = {KEffectEmbossUidValue};
1.106 + /**
1.107 + Uid used to gain access to the Solarize effect. @see ImageProcessor::CImgProcessor::EffectL
1.108 + */
1.109 + const TUid KEffectSolarizeUid = {KEffectSolarizeUidValue};
1.110 + /**
1.111 + Uid used to gain access to the Posterize effect. @see ImageProcessor::CImgProcessor::EffectL
1.112 + */
1.113 + const TUid KEffectPosterizeUid = {KEffectPosterizeUidValue};
1.114 + /**
1.115 + Uid used to gain access to the Stamp effect. @see ImageProcessor::CImgProcessor::EffectL
1.116 + */
1.117 + const TUid KEffectStampUid = {KEffectStampUidValue};
1.118 + /**
1.119 + Uid used to gain access to the Sketch effect. @see ImageProcessor::CImgProcessor::EffectL
1.120 + */
1.121 + const TUid KEffectSketchUid = {KEffectSketchUidValue};
1.122 + /**
1.123 + Uid used to gain access to the Noise effect. @see ImageProcessor::CImgProcessor::EffectL
1.124 + */
1.125 + const TUid KEffectNoiseUid = {KEffectNoiseUidValue};
1.126 + /**
1.127 + Uid used to gain access to the Moonlight effect. @see ImageProcessor::CImgProcessor::EffectL
1.128 + */
1.129 + const TUid KEffectMoonlightUid = {KEffectMoonlightUidValue};
1.130 + /**
1.131 + Uid used to gain access to the FrostedGlass effect. @see ImageProcessor::CImgProcessor::EffectL
1.132 + */
1.133 + const TUid KEffectFrostedGlassUid = {KEffectFrostedGlassUidValue};
1.134 + /**
1.135 + Uid used to gain access to the Despeckle effect. @see ImageProcessor::CImgProcessor::EffectL
1.136 + */
1.137 + const TUid KEffectDespeckleUid = {KEffectDespeckleUidValue};
1.138 + /**
1.139 + Uid used to gain access to the Blur effect. @see ImageProcessor::CImgProcessor::EffectL
1.140 + */
1.141 + const TUid KEffectBlurUid = {KEffectBlurUidValue};
1.142 + /**
1.143 + Uid used to gain access to the Colorization effect. @see ImageProcessor::CImgProcessor::EffectL
1.144 + */
1.145 + const TUid KEffectColorizationUid = {KEffectColorizationUidValue};
1.146 + /**
1.147 + Uid used to gain access to the Cartoon effect. @see ImageProcessor::CImgProcessor::EffectL
1.148 + */
1.149 + const TUid KEffectCartoonUid = {KEffectCartoonUidValue};
1.150 + /**
1.151 + Uid used to gain access to the LocalBoost effect. @see ImageProcessor::CImgProcessor::EffectL
1.152 + */
1.153 + const TUid KEffectLocalBoostUid = {KEffectLocalBoostUidValue};
1.154 + /**
1.155 + Uid used to gain access to the ColorBoost effect. @see ImageProcessor::CImgProcessor::EffectL
1.156 + */
1.157 + const TUid KEffectColorBoostUid = {KEffectColorBoostUidValue};
1.158 + /**
1.159 + Uid used to gain access to the WhiteBalance effect. @see ImageProcessor::CImgProcessor::EffectL
1.160 + */
1.161 + const TUid KEffectWhiteBalanceUid = {KEffectWhiteBalanceUidValue};
1.162 + /**
1.163 + Uid used to gain access to the AutoLevels effect. @see ImageProcessor::CImgProcessor::EffectL
1.164 + */
1.165 + const TUid KEffectAutoLevelsUid = {KEffectAutoLevelsUidValue};
1.166 + /**
1.167 + Uid used to gain access to the Levels effect. @see ImageProcessor::CImgProcessor::EffectL
1.168 + */
1.169 + const TUid KEffectLevelsUid = {KEffectLevelsUidValue};
1.170 + /**
1.171 + Uid used to gain access to the Exposure effect. @see ImageProcessor::CImgProcessor::EffectL
1.172 + */
1.173 + const TUid KEffectExposureUid = {KEffectExposureUidValue};
1.174 + /**
1.175 + Uid used to gain access to the SpotLight effect. @see ImageProcessor::CImgProcessor::EffectL
1.176 + */
1.177 + const TUid KEffectSpotLightUid = {KEffectSpotLightUidValue};
1.178 + /**
1.179 + Uid used to gain access to the CustomTransformation effect. @see ImageProcessor::CImgProcessor::EffectL
1.180 + */
1.181 + const TUid KEffectCustomTransformationUid = {KEffectCustomTransformationUidValue};
1.182 + /**
1.183 + Uid used to gain access to the Antique effect. @see ImageProcessor::CImgProcessor::EffectL
1.184 + */
1.185 + const TUid KEffectAntiqueUid = {KEffectAntiqueUidValue};
1.186 +
1.187 + //Others
1.188 + /**
1.189 + Uid used to gain access to the GeometricalOperation effect. @see ImageProcessor::CImgProcessor::EffectL
1.190 + */
1.191 + const TUid KGeometricalOperationUid = {KGeometricalOperationUidValue};
1.192 + /**
1.193 + Uid used to gain access to the Border effect. @see ImageProcessor::CImgProcessor::EffectL
1.194 + */
1.195 + const TUid KEffectBorderUid = {KEffectBorderUidValue};
1.196 +
1.197 +/**
1.198 +The class is the parent class of all effects.
1.199 +The extended class should implement three stages/functions: "begin -> set -> end"
1.200 +
1.201 +@publishedAll
1.202 +@released
1.203 +*/
1.204 +class TEffect
1.205 + {
1.206 +public:
1.207 + /** Describes the type of the effect in terms of the type of parameter input to adjust levels. */
1.208 + enum TEffectInputType
1.209 + {
1.210 + EEffectInputTypeInt,
1.211 + EEffectInputTypeReal32,
1.212 + EEffectInputTypeCustom
1.213 + };
1.214 +
1.215 +public:
1.216 + inline TUid Type() const;
1.217 + inline Plugin::MEffect& PluginEffect() const;
1.218 + inline TBool IsActive() const;
1.219 +
1.220 + IMPORT_C void BeginL();
1.221 + IMPORT_C void EndL();
1.222 +
1.223 + IMPORT_C TEffectInputType InputType() const;
1.224 +
1.225 + IMPORT_C void SetLevelL(TInt aLevel);
1.226 + IMPORT_C void LevelL(TInt& aLevel) const;
1.227 + IMPORT_C void LevelSettings(TInt& aMinimumLevel, TInt& aMaximumLevel, TInt& aLevelStep) const;
1.228 +
1.229 + IMPORT_C void SetLevelL(TReal32 aLevel);
1.230 + IMPORT_C void LevelL(TReal32& aLevel) const ;
1.231 + IMPORT_C void LevelSettings(TReal32& aMinimumLevel, TReal32& aMaximumLevel, TReal32& aLevelStep) const;
1.232 +
1.233 + IMPORT_C void ResetL();
1.234 + IMPORT_C TAny* Extension(TUid aExtension);
1.235 +
1.236 +protected:
1.237 + friend class CImageProcessorImpl;
1.238 + /**
1.239 + @internalComponent
1.240 + */
1.241 + TEffect(const TUid& aUid, Plugin::MEffect& aPluginEffect, CImageProcessorImpl& aImageProcessorImpl);
1.242 + Plugin::MEffect& iPluginEffect;
1.243 + TUid iUid;
1.244 + TBool iIsActive;
1.245 + CImageProcessorImpl& iImageProcessorImpl;
1.246 +
1.247 + TAny* iReserved;
1.248 + };
1.249 +
1.250 +/**
1.251 +Gets the effect type.
1.252 +
1.253 +@return The UID of the effect.
1.254 +*/
1.255 +TUid TEffect::Type() const
1.256 + {
1.257 + return iUid;
1.258 + }
1.259 +
1.260 +/**
1.261 +Gets associated plugin of the effect.
1.262 +
1.263 +@return A pointer to the related plugin effect instance.
1.264 +*/
1.265 +Plugin::MEffect& TEffect::PluginEffect() const
1.266 + {
1.267 + return iPluginEffect;
1.268 + }
1.269 +
1.270 +/**
1.271 +Gets the state of the effect.
1.272 +
1.273 +@return ETrue if the effect is active.
1.274 +*/
1.275 +TBool TEffect::IsActive() const
1.276 + {
1.277 + return iIsActive;
1.278 + }
1.279 +
1.280 +/**
1.281 +The class provides functions to apply sepia effect to an image.
1.282 +
1.283 +@publishedAll
1.284 +@released
1.285 +*/
1.286 +class TEffectSepia : public TEffect
1.287 + {
1.288 +private:
1.289 + friend class CImageProcessorImpl;
1.290 + TEffectSepia(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.291 + };
1.292 +
1.293 +/**
1.294 +The class provides functions to convert an image to grayscale.
1.295 +
1.296 +@publishedAll
1.297 +@released
1.298 +*/
1.299 +class TEffectGrayscale : public TEffect
1.300 + {
1.301 +private:
1.302 + friend class CImageProcessorImpl;
1.303 + TEffectGrayscale(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.304 + };
1.305 +
1.306 +/**
1.307 +The class provides functions to convert an image similar to a photographic negative.
1.308 +
1.309 +@publishedAll
1.310 +@released
1.311 +*/
1.312 +class TEffectNegative : public TEffect
1.313 + {
1.314 +private:
1.315 + friend class CImageProcessorImpl;
1.316 + TEffectNegative(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.317 + };
1.318 +
1.319 +/**
1.320 +The class provides functions to convert an image to combined grayscale and negative. (Consider removing this effect)
1.321 +
1.322 +@publishedAll
1.323 +@released
1.324 +*/
1.325 +class TEffectGrayscaleNegative : public TEffect
1.326 + {
1.327 +private:
1.328 + friend class CImageProcessorImpl;
1.329 + TEffectGrayscaleNegative(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.330 + };
1.331 +
1.332 +/**
1.333 +The class provides functions to make an image look like an oil painting.
1.334 +
1.335 +@publishedAll
1.336 +@released
1.337 +*/
1.338 +class TEffectOily : public TEffect
1.339 + {
1.340 +private:
1.341 + friend class CImageProcessorImpl;
1.342 + TEffectOily(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.343 + };
1.344 +
1.345 +/**
1.346 +The class provides functions to make an image look like a painting (how is this distinct from an oil painting effect?).
1.347 +
1.348 +@publishedAll
1.349 +@released
1.350 +*/
1.351 +class TEffectPaint : public TEffect
1.352 + {
1.353 +private:
1.354 + friend class CImageProcessorImpl;
1.355 + TEffectPaint(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.356 + };
1.357 +
1.358 +/**
1.359 +The class provides functions to apply a "milky" surface effect to an image.
1.360 +
1.361 +@publishedAll
1.362 +@released
1.363 +*/
1.364 +class TEffectMilky : public TEffect
1.365 + {
1.366 +private:
1.367 + friend class CImageProcessorImpl;
1.368 + TEffectMilky(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.369 + };
1.370 +
1.371 +/**
1.372 +The class provides functions to apply a fog effect to an image.
1.373 +
1.374 +@publishedAll
1.375 +@released
1.376 +*/
1.377 +class TEffectFog : public TEffect
1.378 + {
1.379 +private:
1.380 + friend class CImageProcessorImpl;
1.381 + TEffectFog(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.382 + };
1.383 +
1.384 +/**
1.385 +The class provides functions to apply Antique effect to an image.
1.386 +
1.387 +@publishedAll
1.388 +@released
1.389 +*/
1.390 +class TEffectAntique : public TEffect
1.391 + {
1.392 +private:
1.393 + friend class CImageProcessorImpl;
1.394 + TEffectAntique(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.395 + };
1.396 +
1.397 +/**
1.398 +The class provides functions to apply a mirror effect to an image.
1.399 +Mirrors the left side of the image on the right side of the image.
1.400 +
1.401 +@publishedAll
1.402 +@released
1.403 +*/
1.404 +class TEffectMirrorLeftToRight : public TEffect
1.405 + {
1.406 +private:
1.407 + friend class CImageProcessorImpl;
1.408 + TEffectMirrorLeftToRight(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.409 + };
1.410 +
1.411 +/**
1.412 +The class provides functions to apply a mix of edge distinction and color manipulation to an image.
1.413 +
1.414 +@publishedAll
1.415 +@released
1.416 +*/
1.417 +class TEffectMagicPen : public TEffect
1.418 + {
1.419 +private:
1.420 + friend class CImageProcessorImpl;
1.421 + TEffectMagicPen(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.422 + };
1.423 +
1.424 +/**
1.425 +The class provides functions to adjust the brightness level of an image.
1.426 +
1.427 +@publishedAll
1.428 +@released
1.429 +*/
1.430 +class TEffectBrightness : public TEffect
1.431 + {
1.432 +private:
1.433 + friend class CImageProcessorImpl;
1.434 + TEffectBrightness(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.435 + };
1.436 +
1.437 +/**
1.438 +The class provides functions to adjust the sharpness level of an image.
1.439 +
1.440 +@publishedAll
1.441 +@released
1.442 +*/
1.443 +class TEffectSharpness : public TEffect
1.444 + {
1.445 +private:
1.446 + friend class CImageProcessorImpl;
1.447 + TEffectSharpness(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.448 + };
1.449 +
1.450 +/**
1.451 +The class provides functions to rotate an image through an arbitrary angle.
1.452 +
1.453 +@publishedAll
1.454 +@released
1.455 +*/
1.456 +class TEffectRotation : public TEffect
1.457 + {
1.458 +public:
1.459 + /**
1.460 + Parameters to control the scale of the image when rotation is applied
1.461 + */
1.462 + enum TRotationScaleMode
1.463 + {
1.464 + /** The image is not scaled when rotation is applied, which is the default mode*/
1.465 + ERotationScaleModeIgnore,
1.466 + /** The image will be rotated, and scaled to fit inside the margins of the original image*/
1.467 + ERotationScaleModeFitInside,
1.468 + /** The image will be rotated, and scaled to fully enclose the margins of the original image*/
1.469 + ERotationScaleModeFitOutside
1.470 + };
1.471 +
1.472 + IMPORT_C TRotationScaleMode ScaleModeL() const;
1.473 + IMPORT_C TReal32 AngleL() const;
1.474 + IMPORT_C void SetRotationL(TRotationScaleMode aScaleMode, TReal32 aAngle);
1.475 +
1.476 +private:
1.477 + friend class CImageProcessorImpl;
1.478 + TEffectRotation(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.479 + };
1.480 +
1.481 +/**
1.482 +The class provides functions to apply contrast adjustment to an image.
1.483 +
1.484 +@publishedAll
1.485 +@released
1.486 +*/
1.487 +class TEffectContrast : public TEffect
1.488 + {
1.489 +private:
1.490 + friend class CImageProcessorImpl;
1.491 + TEffectContrast(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.492 + };
1.493 +
1.494 +/**
1.495 +The class provides functions to adjust the RGB color composition of an image
1.496 +
1.497 +@publishedAll
1.498 +@released
1.499 +*/
1.500 +class TEffectRgbColorAdjust : public TEffect
1.501 + {
1.502 +public:
1.503 + IMPORT_C TReal32 RedLevelL() const;
1.504 + IMPORT_C TReal32 GreenLevelL() const;
1.505 + IMPORT_C TReal32 BlueLevelL() const;
1.506 + IMPORT_C void SetRGBLevelL(TReal32 aRedLevel, TReal32 aGreenLevel, TReal32 aBlueLevel);
1.507 +
1.508 +private:
1.509 + friend class CImageProcessorImpl;
1.510 + TEffectRgbColorAdjust(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.511 + };
1.512 +
1.513 +/**
1.514 +The class provides functions to apply an emboss effect in grayscale to an image.
1.515 +
1.516 +@publishedAll
1.517 +@released
1.518 +*/
1.519 +class TEffectEmboss : public TEffect
1.520 + {
1.521 +private:
1.522 + friend class CImageProcessorImpl;
1.523 + TEffectEmboss(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.524 + };
1.525 +
1.526 +/**
1.527 +The class provides functions to apply a solarize look to an image.
1.528 +
1.529 +@publishedAll
1.530 +@released
1.531 +*/
1.532 +class TEffectSolarize : public TEffect
1.533 + {
1.534 +private:
1.535 + friend class CImageProcessorImpl;
1.536 + TEffectSolarize(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.537 + };
1.538 +
1.539 +/**
1.540 +The class provides functions to apply a posterize effect to an image. The number of colors is reduced.
1.541 +
1.542 +@publishedAll
1.543 +@released
1.544 +*/
1.545 +class TEffectPosterize : public TEffect
1.546 + {
1.547 +private:
1.548 + friend class CImageProcessorImpl;
1.549 + TEffectPosterize(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.550 + };
1.551 +
1.552 +/**
1.553 +The class provides functions to apply a rubber stamp effect. Result is a black/white image.
1.554 +
1.555 +@publishedAll
1.556 +@released
1.557 +*/
1.558 +class TEffectStamp : public TEffect
1.559 + {
1.560 +public:
1.561 + IMPORT_C TInt SmoothnessLevelL() const;
1.562 + IMPORT_C TInt ThresholdLevelL() const;
1.563 + IMPORT_C void SetStampLevelL(TInt aSmoothnessLevel, TInt aThresholdLevel);
1.564 +
1.565 +private:
1.566 + friend class CImageProcessorImpl;
1.567 + TEffectStamp(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.568 + };
1.569 +/**
1.570 +The class provides functions to create a sketched representation of an image.
1.571 +
1.572 +@publishedAll
1.573 +@released
1.574 +*/
1.575 +class TEffectSketch : public TEffect
1.576 + {
1.577 +public:
1.578 + /**
1.579 + Parameters to control the sketch mode.
1.580 + */
1.581 + enum TSketchMode
1.582 + {
1.583 + /** Sketch the image in gray, which is the default mode*/
1.584 + ESketchModeGray,
1.585 + /** Sketch the image in color.*/
1.586 + ESketchColor
1.587 + };
1.588 +public:
1.589 + IMPORT_C TSketchMode SketchModeL() const;
1.590 + IMPORT_C void SetSketchModeL(TSketchMode aLevel);
1.591 +
1.592 +private:
1.593 + friend class CImageProcessorImpl;
1.594 + TEffectSketch(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.595 + };
1.596 +
1.597 +/**
1.598 +The class provides functions to apply noise to an image
1.599 +
1.600 +@publishedAll
1.601 +@released
1.602 +*/
1.603 +class TEffectNoise : public TEffect
1.604 + {
1.605 +private:
1.606 + friend class CImageProcessorImpl;
1.607 + TEffectNoise(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.608 + };
1.609 +
1.610 +/**
1.611 +The class provides functions to apply a Moonlight effect to an image.
1.612 +
1.613 +@publishedAll
1.614 +@released
1.615 +*/
1.616 +class TEffectMoonlight : public TEffect
1.617 + {
1.618 + TInt16 ClockL();
1.619 + void SetClockL(TInt16 aClock);
1.620 +
1.621 +private:
1.622 + friend class CImageProcessorImpl;
1.623 + TEffectMoonlight(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.624 + };
1.625 +
1.626 +/**
1.627 +The class provides functions to apply a "frosted glass" surface effect to an image.
1.628 +
1.629 +@publishedAll
1.630 +@released
1.631 +*/
1.632 +class TEffectFrostedGlass : public TEffect
1.633 + {
1.634 +private:
1.635 + friend class CImageProcessorImpl;
1.636 + TEffectFrostedGlass(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.637 + };
1.638 +
1.639 +/**
1.640 +The class provides functions to apply a "despeckle" surface effect to an image, which means to
1.641 +remove noise from images without blurring edges.
1.642 +
1.643 +@publishedAll
1.644 +@released
1.645 +*/
1.646 +class TEffectDespeckle : public TEffect
1.647 + {
1.648 +private:
1.649 + friend class CImageProcessorImpl;
1.650 + TEffectDespeckle(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.651 + };
1.652 +
1.653 +/**
1.654 +The class provides functions to blur an area of the image.
1.655 +
1.656 +@publishedAll
1.657 +@released
1.658 +*/
1.659 +class TEffectBlur : public TEffect
1.660 + {
1.661 +public:
1.662 + IMPORT_C TRect RectL() const;
1.663 + IMPORT_C void SetRectL(TRect aRect);
1.664 +
1.665 +private:
1.666 + friend class CImageProcessorImpl;
1.667 + TEffectBlur(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.668 + };
1.669 +
1.670 +/**
1.671 +The class provides functions to adjust color tone and luminance/chrominance levels.
1.672 +
1.673 +@publishedAll
1.674 +@released
1.675 +*/
1.676 +class TEffectColorization : public TEffect
1.677 + {
1.678 +public:
1.679 + IMPORT_C TRgb ReferenceColorL() const;
1.680 + IMPORT_C TInt LuminanceStrengthL() const;
1.681 + IMPORT_C TInt ChrominanceStrengthL() const;
1.682 + IMPORT_C void SetColorizationL(TRgb aReferenceColor, TInt aLuminanceStrength, TInt aChrominanceStrength);
1.683 +
1.684 +private:
1.685 + friend class CImageProcessorImpl;
1.686 + TEffectColorization(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.687 + };
1.688 +
1.689 +/**
1.690 +The class provides functions to transform an image to typical cartoon graphics style.
1.691 +
1.692 +@publishedAll
1.693 +@released
1.694 +*/
1.695 +class TEffectCartoon : public TEffect
1.696 + {
1.697 +public:
1.698 + IMPORT_C TBool DistinctEdgesL() const;
1.699 + IMPORT_C void SetDistinctEdgesL(TBool aDistinctEdges);
1.700 +
1.701 +private:
1.702 + friend class CImageProcessorImpl;
1.703 + TEffectCartoon(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.704 + };
1.705 +
1.706 +/**
1.707 +The class provides functions to automatically boost and enhance images with unequal illumination.
1.708 +
1.709 +@publishedAll
1.710 +@released
1.711 +*/
1.712 +class TEffectLocalBoost : public TEffect
1.713 + {
1.714 +private:
1.715 + friend class CImageProcessorImpl;
1.716 + TEffectLocalBoost(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.717 + };
1.718 +
1.719 +/**
1.720 +The class provides functions to amplify the colors of an image.
1.721 +
1.722 +@publishedAll
1.723 +@released
1.724 +*/
1.725 +class TEffectColorBoost : public TEffect
1.726 + {
1.727 +private:
1.728 + friend class CImageProcessorImpl;
1.729 + TEffectColorBoost(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.730 + };
1.731 +
1.732 +/**
1.733 +The class provides functions to perform white balance adjustment on an image.
1.734 +
1.735 +@publishedAll
1.736 +@released
1.737 +*/
1.738 +class TEffectWhiteBalance : public TEffect
1.739 + {
1.740 +public:
1.741 + /**
1.742 + Parameters to define the white balance modes.
1.743 + */
1.744 + enum TWhiteBalanceMode
1.745 + {
1.746 + /**Uses the estimated mean gray for the color correction, which is the default mode.*/
1.747 + EWhiteBalanceMeanMode,
1.748 + /**Uses the estimated maximum intensity color.*/
1.749 + EWhiteBalanceMaxMode,
1.750 + /**Uses a white reference color. */
1.751 + EWhiteBalanceManualMode,
1.752 + /**Calulates the reference from the mean value of the 256-bin distribution.*/
1.753 + EWhiteBalanceClusterMode
1.754 + };
1.755 +
1.756 +public:
1.757 + IMPORT_C TWhiteBalanceMode WhiteBalanceModeL() const;
1.758 + IMPORT_C TRgb ReferenceWhiteColorL() const;
1.759 + IMPORT_C void SetWhiteBalanceL(TWhiteBalanceMode aWhiteBalanceMode, TRgb aReferenceWhiteColor);
1.760 +
1.761 +private:
1.762 + friend class CImageProcessorImpl;
1.763 + TEffectWhiteBalance(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.764 + };
1.765 +
1.766 +/**
1.767 +The class provides functions to apply auto level adjustment to an image.
1.768 +Auto level adjustment balances the intensity level of the image, for example making dark images lighter and vice versa.
1.769 +
1.770 +@publishedAll
1.771 +@released
1.772 +*/
1.773 +class TEffectAutoLevels : public TEffect
1.774 + {
1.775 +private:
1.776 + friend class CImageProcessorImpl;
1.777 + TEffectAutoLevels(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.778 + };
1.779 +
1.780 +/**
1.781 +The class provides functions to apply white, gray and black level adjustment to an image.
1.782 +
1.783 +@publishedAll
1.784 +@released
1.785 +*/
1.786 +class TEffectLevels : public TEffect
1.787 + {
1.788 +public:
1.789 + IMPORT_C TReal32 WhiteLevelL() const;
1.790 + IMPORT_C TReal32 GrayLevelL() const;
1.791 + IMPORT_C TReal32 BlackLevelL() const;
1.792 + IMPORT_C void SetWGBLevelL(TReal32 aWhiteLevel, TReal32 aGrayLevel, TReal32 aBlackLevel);
1.793 +
1.794 +private:
1.795 + friend class CImageProcessorImpl;
1.796 + TEffectLevels(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.797 + };
1.798 +
1.799 +/**
1.800 +The class provides functions to control the exposure of an image.
1.801 +
1.802 +@publishedAll
1.803 +@released
1.804 +*/
1.805 +class TEffectExposure : public TEffect
1.806 + {
1.807 +private:
1.808 + friend class CImageProcessorImpl;
1.809 + TEffectExposure(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.810 + };
1.811 +
1.812 +/**
1.813 +The class provides functions to create a spotlight on an image.
1.814 +
1.815 +@publishedAll
1.816 +@released
1.817 +*/
1.818 +class TEffectSpotLight : public TEffect
1.819 + {
1.820 +public:
1.821 + IMPORT_C void SpotLightOrientationL(TPoint &aPosition, TUint32& aRadius, TReal32& aTransitionSize) const;
1.822 + IMPORT_C void SetSpotLightOrientationL(const TPoint& aPosition, TUint32 aRadius, TReal32 aTransitionSize);
1.823 +
1.824 +private:
1.825 + friend class CImageProcessorImpl;
1.826 + TEffectSpotLight(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.827 + };
1.828 +
1.829 +/**
1.830 +The class provides functions to make a custom transformation with an image.
1.831 +
1.832 +@publishedAll
1.833 +@released
1.834 +*/
1.835 +class TEffectCustomTransformation : public TEffect
1.836 + {
1.837 +public:
1.838 + IMPORT_C void SetInputL(const TDesC& aFilename);
1.839 + IMPORT_C void SetInputL(const TDesC8& aBuffer);
1.840 +
1.841 +private:
1.842 + friend class CImageProcessorImpl;
1.843 + TEffectCustomTransformation(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.844 + };
1.845 +
1.846 +/**
1.847 +The class provides functions to geometrically control an image.
1.848 +
1.849 +@publishedAll
1.850 +@released
1.851 +*/
1.852 +class TGeometricalOperation : public TEffect
1.853 + {
1.854 +public:
1.855 + IMPORT_C CImgProcessor::TOperation Operation() const;
1.856 + IMPORT_C void SetOperationL(CImgProcessor::TOperation aOperation);
1.857 +
1.858 +private:
1.859 + friend class CImageProcessorImpl;
1.860 + TGeometricalOperation(Plugin::MEffect& aEffect,CImageProcessorImpl& aImageProcessorImpl);
1.861 + };
1.862 +
1.863 +/**
1.864 +The class provides functions to insert a border to an image.
1.865 +The border file can be input as File, Buffer or Bitmap.
1.866 +
1.867 +@publishedAll
1.868 +@released
1.869 +*/
1.870 +class TEffectBorder : public TEffect
1.871 + {
1.872 +public:
1.873 + IMPORT_C void SetInputL(const TDesC& aFilename);
1.874 + IMPORT_C void SetInputL(const TDesC8& aBuffer);
1.875 + IMPORT_C void SetInputL(const CFbsBitmap& aBitmap);
1.876 +
1.877 +private:
1.878 + friend class CImageProcessorImpl;
1.879 + TEffectBorder(Plugin::MEffect& aEffect, CImageProcessorImpl& aImageProcessorImpl);
1.880 + };
1.881 +
1.882 + }//namespace ImageProcessor
1.883 +
1.884 +#endif //__IMAGE_PROCESSOR_EFFECT_H__