williamr@2: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: #ifndef ECAMIMAGEPROCESSING_H williamr@2: #define ECAMIMAGEPROCESSING_H williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: class MCameraImageProcessing; williamr@2: class MCameraImageProcessing2; williamr@2: class MCameraImageProcessing3; williamr@2: williamr@2: class MImplementationFactory; williamr@2: williamr@2: /** williamr@2: The current Version of the TColorOperationCapabilities class. williamr@2: williamr@2: */ williamr@2: static const TUint KECamColorOperationCapabilitiesCurrentVersion = 1; williamr@2: williamr@2: /** williamr@2: The current Version of the TBitsIgnore class. williamr@2: williamr@2: */ williamr@2: static const TUint KECamBitsIgnoreCurrentVersion = 1; williamr@2: williamr@2: /** williamr@2: The current Version of the TColorOperationEntry class. williamr@2: williamr@2: */ williamr@2: static const TUint KECamColorOperationEntryCurrentVersion = 1; williamr@2: williamr@2: williamr@2: /* General purpose constants */ williamr@2: williamr@2: /** williamr@2: Uid used to identify the CCamera Post Processing API. williamr@2: Such image operations are performed on the acquired image by the camera itself. williamr@2: @see CCamera::CCameraPresets williamr@2: */ williamr@2: static const TUid KECamImageProcessingUid = {KECamImageProcessingUidValue}; williamr@2: williamr@2: /** Transformations */ williamr@2: /* Adjustments */ williamr@2: /** Brightness adjustment - recognized range [-100:100] */ williamr@2: static const TUid KUidECamEventImageProcessingAdjustBrightness = {KUidECamEventImageProcessingAdjustBrightnessUidValue}; williamr@2: /** Contrast adjustment - recognized range [-100:100] */ williamr@2: static const TUid KUidECamEventImageProcessingAdjustContrast = {KUidECamEventImageProcessingAdjustContrastUidValue}; williamr@2: /** Gamma adjustment - recognized range [0:1000] */ williamr@2: static const TUid KUidECamEventImageProcessingAdjustGamma = {KUidECamEventImageProcessingAdjustGammaUidValue}; williamr@2: /** Sharpness adjustment - recognized range [-100:100] */ williamr@2: static const TUid KUidECamEventImageProcessingAdjustSharpness = {KUidECamEventImageProcessingAdjustSharpnessUidValue}; williamr@2: /** Saturation adjustment - recognized range [-100:100] */ williamr@2: static const TUid KUidECamEventtImageProcessingAdjustSaturation = {KUidECamEventtImageProcessingAdjustSaturationUidValue}; williamr@2: static const TUid KUidECamEventImageProcessingAdjustSaturation = {KUidECamEventtImageProcessingAdjustSaturationUidValue}; williamr@2: /** Hue adjustment - recognized range [-100:100] */ williamr@2: static const TUid KUidECamEventtImageProcessingAdjustHue = {KUidECamEventtImageProcessingAdjustHueUidValue}; williamr@2: static const TUid KUidECamEventImageProcessingAdjustHue = {KUidECamEventtImageProcessingAdjustHueUidValue}; williamr@2: /** Contrast Enhancement williamr@2: williamr@2: This uid value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or williamr@2: CCamera::NewDuplicate2L(). williamr@2: williamr@2: @internalTechnology williamr@2: */ williamr@2: static const TUid KUidECamEventCIPAdjustContrastEnhancement = {KUidECamEventCIPAdjustContrastEnhancementUidValue}; williamr@2: /** Software based Red Eye Reduction williamr@2: williamr@2: This uid value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or williamr@2: CCamera::NewDuplicate2L() williamr@2: williamr@2: @internalTechnology williamr@2: */ williamr@2: static const TUid KUidECamEventCIPAdjustRedEyeReduction = {KUidECamEventCIPAdjustRedEyeReductionUidValue}; williamr@2: williamr@2: /** williamr@2: Image distortion correction. williamr@2: williamr@2: This uid value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or williamr@2: CCamera::NewDuplicate2L() williamr@2: williamr@2: @internalTechnology williamr@2: */ williamr@2: static const TUid KUidECamEventCIPImageDistortionCorrection = {KUidECamEventCIPImageDistortionCorrectionUidValue}; williamr@2: williamr@2: williamr@2: /** Effect value */ williamr@2: static const TUid KUidECamEventImageProcessingEffect = {KUidECamEventImageProcessingEffectUidValue}; williamr@2: williamr@2: /* Transforms */ williamr@2: /** Crop */ williamr@2: static const TUid KUidECamEventImageProcessingTransformCrop = {KUidECamEventImageProcessingTransformCropUidValue}; williamr@2: /** Rotation */ williamr@2: static const TUid KUidECamEventImageProcessingTransformRotate = {KUidECamEventImageProcessingTransformRotateUidValue}; williamr@2: /** Mirroring */ williamr@2: static const TUid KUidECamEventImageProcessingTransformMirror = {KUidECamEventImageProcessingTransformMirrorUidValue}; williamr@2: /** Rescale */ williamr@2: static const TUid KUidECamEventImageProcessingTransformScale = {KUidECamEventImageProcessingTransformScaleUidValue}; williamr@2: /** origin subset */ williamr@2: static const TUid KUidECamEventImageProcessingSourceRect = {KUidECamEventImageProcessingSourceRectUidValue}; williamr@2: /** Noise reduction */ williamr@2: static const TUid KUidECamEventImageProcessingNoiseReduction = {KUidECamEventImageProcessingNoiseReductionUidValue}; williamr@2: /** Glare removal */ williamr@2: static const TUid KUidECamEventImageProcessingGlareRemoval = {KUidECamEventImageProcessingGlareRemovalUidValue}; williamr@2: /** Relative Orientation williamr@2: williamr@2: This uid value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or williamr@2: CCamera::NewDuplicate2L(). williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: static const TUid KUidECamEventImageProcessingTransformRelativeOrientation = {KUidECamEventImageProcessingTransformRelativeOrientationUidValue}; williamr@2: williamr@2: /** Default value for image processing */ williamr@2: static const TInt KECamImageProcessingDefaultValue = 0; williamr@2: williamr@2: /** williamr@2: Uid used to indicate completion of StartColorSwap williamr@2: williamr@2: */ williamr@2: static const TUid KUidECamEventCIPStartColorSwap = {KUidECamEventCIPStartColorSwapUidValue}; williamr@2: williamr@2: /** williamr@2: Uid used to indicate completion of StartColorAccent williamr@2: williamr@2: */ williamr@2: static const TUid KUidECamEventCIPStartColorAccent = {KUidECamEventCIPStartColorAccentUidValue}; williamr@2: williamr@2: /** williamr@2: Uid used to notify that the current picture orientation is unachievable after setting the relative custom orientation. williamr@2: williamr@2: @see CCamera::CCameraImageProcessing::SetRelativeCustomOrientationL(TOrientationReference aOrientationReference, williamr@2: TRelativeCustomOrientation aRelativeCustomOrientation); williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: static const TUid KUidECamEventPictureOrientationUnachievable = {KUidECamEventPictureOrientationUnachievableUidValue}; williamr@2: williamr@2: /** williamr@2: This class is used to perform image processing operations on the camera. williamr@2: These include brightness, contrast, gamma, hue, sharpness and saturation adjustments. The client is also williamr@2: able to perform simple image transformations like cropping, rotation, mirroring, scaling, noise reduction and glare reduction. . williamr@2: When an operation selection is complete, all clients are notified with the respective event UID. williamr@2: williamr@2: As often cameras may support only a subset of discrete values of the allowed range, williamr@2: the API allows the client to retrieve those and use them explicitly. williamr@2: williamr@2: @note This class is not intended for sub-classing and used to standardise existing williamr@2: varieties of implementations. williamr@2: williamr@2: @note it is assumed that setting a new value for a transformations(transform, adjust, effect) effectively williamr@2: activates the transformations. Whilst for effects and adjustments there is always a value, transforms williamr@2: may have a dependency on other parameters and williamr@2: crop - requires setting of source rectangle. williamr@2: scale - will use setting of source rectangle, and the magnification factor is williamr@2: determined by the source rectangle and the output size. This is always magnification. williamr@2: if a value is set, it is assumed to be a scaling factor multiplied by KECamFineResolutionFactor williamr@2: and set to integer. williamr@2: mirror - values of TMirror type. williamr@2: rotation - the angle in degrees. williamr@2: noise reduction - TNoiseReduction. williamr@2: glare removal - TGlareReduction. williamr@2: williamr@2: Example williamr@2: williamr@2: @code williamr@2: // Lets assume that an application would need to check whether gamma correction is williamr@2: // supported on a particular platform. After obtaining a valid pointer to the interface, williamr@2: // it would call GetSupportedTransformationsL() to obtain the list of the supported williamr@2: // transformations and check whether KUidECamEventImageProcessingAdjustGamma williamr@2: // is in the list. If it is then call SetTranformationValue(KUidECamEventImageProcessingAdjustGamma, 200); williamr@2: // to set the new value. A notification will be generated to the client to indicate success. williamr@2: williamr@2: RArray suppTransforms; // array of supported transformations williamr@2: CleanupClosePushL(suppTransforms); williamr@2: williamr@2: imageProcess->GetSupportedTransformationsL(suppTransfUids); williamr@2: ... williamr@2: // if the gamma is supported williamr@2: TInt gammaCorrection = 200; // gamma correction of 2.0 williamr@2: imageProcess->SetTranformationValue(KUidECamEventImageProcessingAdjustGamma, gammaCorrection); williamr@2: ... williamr@2: // pop stack to close the RArray williamr@2: @endcode williamr@2: williamr@2: @note If the class methods leave, the output type parameter value is not guaranteed to be valid. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: class CCamera::CCameraImageProcessing : public CBase williamr@2: { williamr@2: williamr@2: // so can use internal factory functions etc. williamr@2: friend class CCamera; williamr@2: williamr@2: public: williamr@2: williamr@2: /** Gamma settings */ williamr@2: enum TGamma williamr@2: { williamr@2: /** Sets the gamma adjustment automatically. */ williamr@2: EGammaAuto = KMinTInt williamr@2: }; williamr@2: /** Sharpness Settings */ williamr@2: enum TSharpness williamr@2: { williamr@2: /** Sets the sharpness adjustment automatically. */ williamr@2: ESharpnessAuto = KMinTInt williamr@2: }; williamr@2: /** Saturation Settings */ williamr@2: enum TSaturation williamr@2: { williamr@2: /** Sets the saturation adjustment automatically. */ williamr@2: ESaturationAuto = KMinTInt williamr@2: }; williamr@2: /** Hue Settings */ williamr@2: enum THue williamr@2: { williamr@2: /** Sets the hue adjustment automatically. */ williamr@2: EHueAuto = KMinTInt williamr@2: }; williamr@2: williamr@2: /** Settings for the supported effects */ williamr@2: enum TEffect williamr@2: { williamr@2: /** Effects off is default, always supported */ williamr@2: EEffectNone = 0x00000000, williamr@2: /** Negative visual effect. */ williamr@2: EEffectNegative = 0x00000001, williamr@2: /** Black and white visual effect. */ williamr@2: EEffectMonochrome = 0x00000002, williamr@2: /** Solarization visual effect. */ williamr@2: EEffectSolarize = 0x00000004, williamr@2: /** Sepia visual effect. */ williamr@2: EEffectSepia = 0x00000008, williamr@2: /** Emboss visual effect. */ williamr@2: EEffectEmboss = 0x00000010, williamr@2: /** Red eye glare reduction visual effect. */ williamr@2: EEffectRedEyeReduction = 0x00000020, williamr@2: /** Vivid colour visual effect. */ williamr@2: EEffectVivid = 0x00000040, williamr@2: /** Neutral colour visual effect. */ williamr@2: EEffectNeutral = 0x00000080, williamr@2: /** Selective sharpening visual effect. */ williamr@2: EEffectLowSharpening = 0x00000100, williamr@2: /** williamr@2: Natural visual effect. williamr@2: williamr@2: This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or williamr@2: CCamera::NewDuplicate2L(). williamr@2: williamr@2: */ williamr@2: EEffectNatural = 0x00000200, williamr@2: /** williamr@2: Cine visual effect. williamr@2: williamr@2: This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or williamr@2: CCamera::NewDuplicate2L(). williamr@2: williamr@2: */ williamr@2: EEffectCine = 0x00000400, williamr@2: /** williamr@2: Old film visual effect. williamr@2: williamr@2: This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or williamr@2: CCamera::NewDuplicate2L(). williamr@2: williamr@2: */ williamr@2: EEffectOldFilm = 0x00000800, williamr@2: /** williamr@2: Color swap visual effect. williamr@2: williamr@2: This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or williamr@2: CCamera::NewDuplicate2L(). williamr@2: williamr@2: */ williamr@2: EEffectColorSwap = 0x00001000, williamr@2: /** williamr@2: Where a list of color can be kept as they are and the rest converted to gray. williamr@2: williamr@2: This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or williamr@2: CCamera::NewDuplicate2L(). williamr@2: williamr@2: */ williamr@2: EEffectColorAccent = 0x00002000 williamr@2: }; williamr@2: williamr@2: /** Mirror settings */ williamr@2: enum TMirror williamr@2: { williamr@2: /** Default value. Mirroring is disabled. */ williamr@2: EMirrorNone = 0x00000000, williamr@2: /** Mirror along horizontal axis. */ williamr@2: EMirrorHorizontal = 0x00000001, williamr@2: /** Mirror along vertical axis. */ williamr@2: EMirrorVertical = 0x00000002, williamr@2: /** Mirror along horizontal and vertical axis. */ williamr@2: EMirrorBoth = 0x00000003 williamr@2: }; williamr@2: williamr@2: /** Noise filter settings */ williamr@2: enum TNoiseReduction williamr@2: { williamr@2: /** Default value. Noise reduction disabled. */ williamr@2: ENoiseReductionNone = 0x0000, williamr@2: /** most basic noise reduction. */ williamr@2: ENoiseReductionBasic = 0x0001 williamr@2: }; williamr@2: williamr@2: /** Glare reduction settings */ williamr@2: enum TGlareReduction williamr@2: { williamr@2: /** Default value. Glare reduction disabled. */ williamr@2: EGlareReductionNone = 0x0000, williamr@2: /** most basic glare reduction. */ williamr@2: EGlareReductionBasic = 0x0001 williamr@2: }; williamr@2: williamr@2: /** williamr@2: Used for color swap and color accent feature in TEffect. It describes whether the given source williamr@2: or target color represents itself or a group of color. williamr@2: williamr@2: */ williamr@2: enum TColorOperationRepresentation williamr@2: { williamr@2: /** Feature is not supported */ williamr@2: ERepresentationNone = 0x00, williamr@2: /** The given color is uniquely represented */ williamr@2: ERepresentationSingle = 0x01, williamr@2: /** The given color represents a group of colors */ williamr@2: ERepresentationMultiple = 0x02 williamr@2: }; williamr@2: williamr@2: /** williamr@2: Used for color swap and color accent feature in TEffect. It describes the type of grouping for williamr@2: source and target colors when they represent a group of color. williamr@2: williamr@2: */ williamr@2: enum TColorOperationRgbGroupingMode williamr@2: { williamr@2: /** Feature is not supported */ williamr@2: ERgbGroupingNone = 0x00, williamr@2: /** This means no neighbourhood colors are considered */ williamr@2: ERgbGroupingFixed = 0x01, williamr@2: /** This means neighbourhood colors are to be automatically decided by the implementation or hardware */ williamr@2: ERgbGroupingAutomatic = 0x02, williamr@2: /** This means neighbourhood colors for source have to be decided by ignoring few starting bits. Used for source only */ williamr@2: ERgbGroupingSignificantBits = 0x04, williamr@2: /** This means colors in target are obtained as some uniform proportion using source. Used for target only */ williamr@2: ERgbGroupingUniform = 0x08 williamr@2: }; williamr@2: williamr@2: /** williamr@2: Used to provide different types of references for orientation of images retrieved. These references are the various williamr@2: means by the orientation of an image can be defined. Client needs to choose a particular TOrientationReference and williamr@2: specify any relative rotation, mirroring and flipping on top of it. williamr@2: williamr@2: This enumeration has nothing to do with absolute rotation. Uid KUidECamEventImageProcessingTransformRotate is used williamr@2: for absolute rotation purposes. williamr@2: williamr@2: The enumeration list may be extended in future. williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: enum TOrientationReference williamr@2: { williamr@2: /** The retrieved images will follow the camera sensor orientation. This orientation would be relative williamr@2: to the current screen mode as given by the reference screen. */ williamr@2: EOrientationReferenceCameraSensorOrientation, williamr@2: williamr@2: /** The retrieved images will get oriented as per the tilt sensor information. williamr@2: So,the orientation would be relative to the current screen mode as given by the reference screen. */ williamr@2: EOrientationReferenceTiltOrientation williamr@2: }; williamr@2: williamr@2: /** williamr@2: Used to describe the various relative rotation. The term 'relative' means that the rotation is applied after the williamr@2: image undergoes orientation as given by TOrientationReference. williamr@2: williamr@2: The enumeration list may be extended in future. williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: enum TRelativeRotation williamr@2: { williamr@2: /** Zero degree Rotation applied on top of orientation reference and is relative to current reference screen. */ williamr@2: ERelativeRotation0Degrees = 0x00, williamr@2: /** 90 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen. */ williamr@2: ERelativeRotation90DegreesClockwise = 0x01, williamr@2: /** 180 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen. */ williamr@2: ERelativeRotation180DegreesClockwise = 0x02, williamr@2: /** 270 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen. */ williamr@2: ERelativeRotation270DegreesClockwise = 0x04 williamr@2: }; williamr@2: williamr@2: /** williamr@2: Used to describe the various relative mirroring. The term 'relative' means that the mirroring is applied after the williamr@2: image undergoes orientation as given by TOrientationReference. williamr@2: williamr@2: The enumeration list may be extended in future. williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: enum TRelativeMirror williamr@2: { williamr@2: /** No mirroring. */ williamr@2: ERelativeMirrorNone = 0x00, williamr@2: /** Used to mirror an image about the horizontal axis. This is applied on top of orientation reference and is williamr@2: relative to current reference screen. */ williamr@2: ERelativeMirrorHorizontalAxis = 0x10, williamr@2: /** Used to mirror an image about the vertical axis. This is applied on top of orientation reference and is williamr@2: relative to current reference screen. */ williamr@2: ERelativeMirrorVerticalAxis = 0x20 williamr@2: }; williamr@2: williamr@2: /** williamr@2: Used to describe the various relative flipping. The term 'relative' means that the flipping is applied after the williamr@2: image undergoes orientation as given by TOrientationReference. williamr@2: williamr@2: The enumeration list may be extended in future. williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: enum TRelativeFlipping williamr@2: { williamr@2: /** No flipping. */ williamr@2: ERelativeFlippingNone = 0x00, williamr@2: /** Used to flip an image horizontally. This is applied on top of orientation reference and is relative to current williamr@2: reference screen. */ williamr@2: ERelativeFlippingHorizontal = 0x10, williamr@2: /** Used to flip an image vertically. This is applied on top of orientation reference and is relative to current williamr@2: reference screen. */ williamr@2: ERelativeFlippingVertical = 0x20 williamr@2: }; williamr@2: williamr@2: /** williamr@2: Different types of contrast enhancement options. williamr@2: The enumeration list may be extended in future. williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: enum TContrastEnhancement williamr@2: { williamr@2: /** Not Supported. */ williamr@2: EContrastEnhancementNone =0x00, williamr@2: /** Contrast Enhancement switched off. */ williamr@2: EContrastEnhancementSwitchOff =0x01, williamr@2: /** Contrast Enhacement switched On manually. */ williamr@2: EContrastEnhancementManualSwitchOn =0x02, williamr@2: /** Contrast Enhancement in auto mode. */ williamr@2: EContrastEnhancementSwitchAuto =0x04 williamr@2: }; williamr@2: williamr@2: /** williamr@2: Different types of software-based red eye reduction options. williamr@2: The enumeration list may be extended in future. williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: enum TRedEyeReduction williamr@2: { williamr@2: /** Not Supported. */ williamr@2: ERedEyeReductionNone =0x00, williamr@2: /** Software based Red Eye Reduction can be switched off(disabled). */ williamr@2: ERedEyeReductionSwitchOff =0x01, williamr@2: /** Software based Red Eye Reduction can be switched on (enabled). */ williamr@2: ERedEyeReductionManualSwitchOn =0x02, williamr@2: /** Software based Red Eye Reduction can be put to auto mode. */ williamr@2: ERedEyeReductionSwitchAuto =0x04 williamr@2: }; williamr@2: williamr@2: /** williamr@2: Color operation capabilities characterizing both color swap and color accent feature williamr@2: williamr@2: */ williamr@2: class TColorOperationCapabilities williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Constructor. williamr@2: Sets the size of this class in iSize. williamr@2: */ williamr@2: IMPORT_C TColorOperationCapabilities(); williamr@2: williamr@2: IMPORT_C TInt Size() const; williamr@2: IMPORT_C TUint Version() const; williamr@2: williamr@2: private: williamr@2: //for future expansion williamr@2: TUint iSize:24; williamr@2: TUint iVersion:8; williamr@2: williamr@2: // reserved for future expansion williamr@2: TInt iReserved; williamr@2: williamr@2: public: williamr@2: /** The source color representation that the server supports. williamr@2: The supported representations are held as a bitwise logical OR of the relevant individual modes williamr@2: defined in CCamera::CCameraImageProcessing:: TColorOperationRepresentation. */ williamr@2: TUint iSupportedSourceRepresentation; williamr@2: williamr@2: /** The target color representation that the server supports. williamr@2: The supported representations are held as a bitwise logical OR of the relevant individual modes williamr@2: defined in CCamera::CCameraImageProcessing:: TColorOperationRepresentation. williamr@2: Not applicable for color accent */ williamr@2: TUint iSupportedTargetRepresentation; williamr@2: williamr@2: /** The source color Rgb grouping modes that the server supports. williamr@2: The modes are held as a bitwise logical OR of the relevant individual modes williamr@2: defined in CCamera::CCameraImageProcessing:: TColorOperationRgbGroupingMode. */ williamr@2: TUint iSupportedSourceRgbGroupingMode; williamr@2: williamr@2: /** The target color Rgb grouping modes that the server supports. williamr@2: The modes are held as a bitwise logical OR of the relevant individual modes williamr@2: defined in CCamera::CCameraImageProcessing:: TColorOperationRgbGroupingMode. williamr@2: Not applicable for color accent */ williamr@2: TUint iSupportedTargetRgbGroupingMode; williamr@2: williamr@2: /** This indicates whether the mapping mode and Rgb grouping mode uniform for every color entry */ williamr@2: TBool iIsCapabilityUniform; williamr@2: }; williamr@2: williamr@2: /** williamr@2: Class used to control the number of bits to ignore for Red, Green, Blue or Alpha. williamr@2: This may be used when deciding for neighbourhood for source color in case of color swap and color accent feature williamr@2: williamr@2: */ williamr@2: class TBitsIgnore williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Constructor. williamr@2: Sets the size of this class in iSize. williamr@2: */ williamr@2: IMPORT_C TBitsIgnore(); williamr@2: williamr@2: IMPORT_C TInt Size() const; williamr@2: IMPORT_C TUint Version() const; williamr@2: williamr@2: private: williamr@2: //for future expansion williamr@2: TUint iSize:24; williamr@2: TUint iVersion:8; williamr@2: williamr@2: // for future use williamr@2: TUint iReservedBits:16; williamr@2: williamr@2: public: williamr@2: /** This gives the no. of bits to ignore for Red color. Varies from 0 to 8. williamr@2: Any other value should be an error */ williamr@2: TUint iRedBitsIgnore:4; williamr@2: williamr@2: /** This gives the no. of bits to ignore for Green color. Varies from 0 to 8. williamr@2: Any other value should be an error */ williamr@2: TUint iGreenBitsIgnore:4; williamr@2: williamr@2: /** This gives the no. of bits to ignore for Blue color. Varies from 0 to 8. williamr@2: Any other value should be an error */ williamr@2: TUint iBlueBitsIgnore:4; williamr@2: williamr@2: /** This gives the no. of bits to ignore for Alpha. Varies from 0 to 8. williamr@2: Any other value should be an error */ williamr@2: TUint iAlphaBitsIgnore:4; williamr@2: }; williamr@2: williamr@2: /** williamr@2: Color operation parameters characterizing both color swap and color accent feature; and for a particular entry. williamr@2: williamr@2: */ williamr@2: class TColorOperationEntry williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Constructor. williamr@2: Sets the size of this class in iSize. williamr@2: */ williamr@2: IMPORT_C TColorOperationEntry(); williamr@2: williamr@2: IMPORT_C TInt Size() const; williamr@2: IMPORT_C TUint Version() const; williamr@2: williamr@2: private: williamr@2: //for future expansion williamr@2: TUint iSize:24; williamr@2: TUint iVersion:8; williamr@2: williamr@2: // reserved for future expansion williamr@2: TInt iReserved; williamr@2: williamr@2: public: williamr@2: /** The source color (rgb triplet) which is changed to target color in case of Color Swap operation williamr@2: and remains unaffected in case of Color Accent operation */ williamr@2: TRgb iSourceColor; williamr@2: williamr@2: /** The target color (rgb triplet) which replaces the source color in case of Color Swap operation. williamr@2: Redundant for Color Accent operation */ williamr@2: TRgb iTargetColor; williamr@2: williamr@2: /** This defines whether the given source color represents itself or a group of colors */ williamr@2: TColorOperationRepresentation iSourceColorRepresentation; williamr@2: williamr@2: /** This defines whether the given target color represents itself or a group of colors in case of williamr@2: Color Swap operation. Redundant for Color Accent operation */ williamr@2: TColorOperationRepresentation iTargetColorRepresentation; williamr@2: williamr@2: /** This defines the type of grouping for multiple representation of source color */ williamr@2: TColorOperationRgbGroupingMode iColorOperationSourceRgbGroupingMode; williamr@2: williamr@2: /** This defines the type of grouping for multiple representation of target color in case of williamr@2: Color Swap operation. Redundant for Color Accent operation */ williamr@2: TColorOperationRgbGroupingMode iColorOperationTargetRgbGroupingMode; williamr@2: williamr@2: /** This gives the number of bits to ignore in case ERgbGroupingSignificantBits is used for williamr@2: multiple representation of source color. For any other case, no. of bits ignored for red, green, williamr@2: blue or alpha should be 0 */ williamr@2: TBitsIgnore iNumBitsIgnored; williamr@2: williamr@2: /** This gives the entry status of every color operation entry. If entry is not set or removed, williamr@2: this is ENotActive. And if entry is set, then this is EDiscreteSteps */ williamr@2: TValueInfo iEntryStatus; williamr@2: }; williamr@2: williamr@2: public: williamr@2: williamr@2: IMPORT_C static CCameraImageProcessing* NewL(CCamera& aCamera); williamr@2: williamr@2: IMPORT_C static CCameraImageProcessing* CreateL(CCamera& aCamera, MImplementationFactory& aImplFactory); williamr@2: williamr@2: IMPORT_C void GetSupportedTransformationsL(RArray& aTransformations) const; williamr@2: williamr@2: IMPORT_C void GetActiveTransformationsL(RArray& aTransformations) const; williamr@2: williamr@2: IMPORT_C void GetTransformationSupportedValuesL(TUid aTransformation, RArray& aValues, TValueInfo& aInfo) const; williamr@2: williamr@2: IMPORT_C TInt TransformationValue(TUid aTransformation) const; williamr@2: williamr@2: IMPORT_C TInt GetTransformationValue(TUid aTransformation, TInt& aTransformationValue) const; williamr@2: williamr@2: IMPORT_C void SetTransformationValue(TUid aTransformation, TInt aValue); williamr@2: williamr@2: IMPORT_C void GetActiveTransformSequenceL(RArray& aTransformSequence) const; williamr@2: williamr@2: IMPORT_C void SetActiveTransformSequenceL(RArray& aTransformSequence); williamr@2: williamr@2: IMPORT_C void SetSourceRect(const TRect& aRect); williamr@2: williamr@2: IMPORT_C void GetSourceRect(TRect& aRect) const; williamr@2: williamr@2: IMPORT_C ~CCameraImageProcessing(); williamr@2: williamr@2: IMPORT_C void GetConcurrentColorSwappingsSupportedL(TInt& aConcurrentColorSwappingSupported) const; williamr@2: williamr@2: IMPORT_C void GetColorSwapCapabilitiesL(TInt aIndex, TColorOperationCapabilities& aColorSwapCapabilities) const; williamr@2: williamr@2: IMPORT_C void SetColorSwapEntryL(TInt aIndex, const TColorOperationEntry& aColorSwapParameters); williamr@2: williamr@2: IMPORT_C void RemoveColorSwapEntryL(TInt aIndex); williamr@2: williamr@2: IMPORT_C void GetColorSwapEntryL(TInt aIndex, TColorOperationEntry& aColorSwapParameters) const; williamr@2: williamr@2: IMPORT_C void StartColorSwappingL(); williamr@2: williamr@2: IMPORT_C void CancelColorSwappingL(); williamr@2: williamr@2: IMPORT_C void GetConcurrentColorAccentSupportedL(TInt& aConcurrentColorAccentSupported) const; williamr@2: williamr@2: IMPORT_C void GetColorAccentCapabilitiesL(TInt aIndex, TColorOperationCapabilities& aColorAccentCapabilities) const; williamr@2: williamr@2: IMPORT_C void SetColorAccentEntryL(TInt aIndex, const TColorOperationEntry& aColorAccentParameters); williamr@2: williamr@2: IMPORT_C void RemoveColorAccentEntryL(TInt aIndex); williamr@2: williamr@2: IMPORT_C void GetColorAccentEntryL(TInt aIndex, TColorOperationEntry& aColorAccentParameters) const; williamr@2: williamr@2: IMPORT_C void StartColorAccentL(); williamr@2: williamr@2: IMPORT_C void CancelColorAccentL(); williamr@2: williamr@2: IMPORT_C void GetSupportedRelativeOrientationOptionsL(TOrientationReference aOrientationReference, williamr@2: TUint& aSupportedRelativeRotation, TUint& aSupportedRelativeMirroring, TUint& aSupportedRelativeFlipping) const; williamr@2: williamr@2: IMPORT_C void GetCurrentRelativeOrientationOptionsL(TOrientationReference& aOrientationReference, williamr@2: TRelativeRotation& aRelativeRotation, TRelativeMirror& aRelativeMirror, TRelativeFlipping& aRelativeFlipping) const; williamr@2: williamr@2: IMPORT_C void SetRelativeOrientationOptionsL(TOrientationReference aOrientationReference, williamr@2: TRelativeRotation aRelativeRotation, TRelativeMirror aRelativeMirror, TRelativeFlipping aRelativeFlipping); williamr@2: williamr@2: private: williamr@2: CCameraImageProcessing(CCamera& aOwner); williamr@2: void ConstructL(); williamr@2: void ConstructL(const MImplementationFactory& aImplFactory); williamr@2: williamr@2: private: williamr@2: CCamera& iOwner; williamr@2: MCameraImageProcessing* iImpl; // not owned williamr@2: MCameraImageProcessing2* iImpl2; //not owned williamr@2: MCameraImageProcessing3* iImpl3; //not owned williamr@2: }; williamr@2: #endif//ECAMIMAGEPROCESSING_H