|
1 // Copyright (c) 2005-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 #ifndef ECAMIMAGEPROCESSING_H |
|
22 #define ECAMIMAGEPROCESSING_H |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <gdi.h> |
|
26 #include <ecam.h> |
|
27 #include <ecamadvsettingsuids.hrh> |
|
28 #include <ecam/ecamconstants.h> |
|
29 |
|
30 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
31 #include <ecamimageprocessingconst.h> |
|
32 #include <ecamimageprocessingdef.h> |
|
33 #endif |
|
34 |
|
35 |
|
36 class MCameraImageProcessing; |
|
37 class MCameraImageProcessing2; |
|
38 class MCameraImageProcessing3; |
|
39 |
|
40 class MImplementationFactory; |
|
41 |
|
42 /** |
|
43 The current Version of the TColorOperationCapabilities class. |
|
44 |
|
45 */ |
|
46 static const TUint KECamColorOperationCapabilitiesCurrentVersion = 1; |
|
47 |
|
48 /** |
|
49 The current Version of the TBitsIgnore class. |
|
50 |
|
51 */ |
|
52 static const TUint KECamBitsIgnoreCurrentVersion = 1; |
|
53 |
|
54 /** |
|
55 The current Version of the TColorOperationEntry class. |
|
56 |
|
57 */ |
|
58 static const TUint KECamColorOperationEntryCurrentVersion = 1; |
|
59 |
|
60 |
|
61 /* General purpose constants */ |
|
62 |
|
63 /** |
|
64 Uid used to identify the CCamera Post Processing API. |
|
65 Such image operations are performed on the acquired image by the camera itself. |
|
66 @see CCamera::CCameraPresets |
|
67 */ |
|
68 static const TUid KECamImageProcessingUid = {KECamImageProcessingUidValue}; |
|
69 |
|
70 /** Transformations */ |
|
71 /* Adjustments */ |
|
72 /** Brightness adjustment - recognized range [-100:100] */ |
|
73 static const TUid KUidECamEventImageProcessingAdjustBrightness = {KUidECamEventImageProcessingAdjustBrightnessUidValue}; |
|
74 /** Contrast adjustment - recognized range [-100:100] */ |
|
75 static const TUid KUidECamEventImageProcessingAdjustContrast = {KUidECamEventImageProcessingAdjustContrastUidValue}; |
|
76 /** Gamma adjustment - recognized range [0:1000] */ |
|
77 static const TUid KUidECamEventImageProcessingAdjustGamma = {KUidECamEventImageProcessingAdjustGammaUidValue}; |
|
78 /** Sharpness adjustment - recognized range [-100:100] */ |
|
79 static const TUid KUidECamEventImageProcessingAdjustSharpness = {KUidECamEventImageProcessingAdjustSharpnessUidValue}; |
|
80 /** Saturation adjustment - recognized range [-100:100] */ |
|
81 static const TUid KUidECamEventtImageProcessingAdjustSaturation = {KUidECamEventtImageProcessingAdjustSaturationUidValue}; |
|
82 static const TUid KUidECamEventImageProcessingAdjustSaturation = {KUidECamEventtImageProcessingAdjustSaturationUidValue}; |
|
83 /** Hue adjustment - recognized range [-100:100] */ |
|
84 static const TUid KUidECamEventtImageProcessingAdjustHue = {KUidECamEventtImageProcessingAdjustHueUidValue}; |
|
85 static const TUid KUidECamEventImageProcessingAdjustHue = {KUidECamEventtImageProcessingAdjustHueUidValue}; |
|
86 |
|
87 |
|
88 /** Effect value */ |
|
89 static const TUid KUidECamEventImageProcessingEffect = {KUidECamEventImageProcessingEffectUidValue}; |
|
90 |
|
91 /* Transforms */ |
|
92 /** Crop */ |
|
93 static const TUid KUidECamEventImageProcessingTransformCrop = {KUidECamEventImageProcessingTransformCropUidValue}; |
|
94 /** Rotation */ |
|
95 static const TUid KUidECamEventImageProcessingTransformRotate = {KUidECamEventImageProcessingTransformRotateUidValue}; |
|
96 /** Mirroring */ |
|
97 static const TUid KUidECamEventImageProcessingTransformMirror = {KUidECamEventImageProcessingTransformMirrorUidValue}; |
|
98 /** Rescale */ |
|
99 static const TUid KUidECamEventImageProcessingTransformScale = {KUidECamEventImageProcessingTransformScaleUidValue}; |
|
100 /** origin subset */ |
|
101 static const TUid KUidECamEventImageProcessingSourceRect = {KUidECamEventImageProcessingSourceRectUidValue}; |
|
102 /** Noise reduction */ |
|
103 static const TUid KUidECamEventImageProcessingNoiseReduction = {KUidECamEventImageProcessingNoiseReductionUidValue}; |
|
104 /** Glare removal */ |
|
105 static const TUid KUidECamEventImageProcessingGlareRemoval = {KUidECamEventImageProcessingGlareRemovalUidValue}; |
|
106 |
|
107 /** Default value for image processing */ |
|
108 static const TInt KECamImageProcessingDefaultValue = 0; |
|
109 |
|
110 /** |
|
111 Uid used to indicate completion of StartColorSwap |
|
112 |
|
113 */ |
|
114 static const TUid KUidECamEventCIPStartColorSwap = {KUidECamEventCIPStartColorSwapUidValue}; |
|
115 |
|
116 /** |
|
117 Uid used to indicate completion of StartColorAccent |
|
118 |
|
119 */ |
|
120 static const TUid KUidECamEventCIPStartColorAccent = {KUidECamEventCIPStartColorAccentUidValue}; |
|
121 |
|
122 |
|
123 /** |
|
124 This class is used to perform image processing operations on the camera. |
|
125 These include brightness, contrast, gamma, hue, sharpness and saturation adjustments. The client is also |
|
126 able to perform simple image transformations like cropping, rotation, mirroring, scaling, noise reduction and glare reduction. . |
|
127 When an operation selection is complete, all clients are notified with the respective event UID. |
|
128 |
|
129 As often cameras may support only a subset of discrete values of the allowed range, |
|
130 the API allows the client to retrieve those and use them explicitly. |
|
131 |
|
132 @note This class is not intended for sub-classing and used to standardise existing |
|
133 varieties of implementations. |
|
134 |
|
135 @note it is assumed that setting a new value for a transformations(transform, adjust, effect) effectively |
|
136 activates the transformations. Whilst for effects and adjustments there is always a value, transforms |
|
137 may have a dependency on other parameters and |
|
138 crop - requires setting of source rectangle. |
|
139 scale - will use setting of source rectangle, and the magnification factor is |
|
140 determined by the source rectangle and the output size. This is always magnification. |
|
141 if a value is set, it is assumed to be a scaling factor multiplied by KECamFineResolutionFactor |
|
142 and set to integer. |
|
143 mirror - values of TMirror type. |
|
144 rotation - the angle in degrees. |
|
145 noise reduction - TNoiseReduction. |
|
146 glare removal - TGlareReduction. |
|
147 |
|
148 Example |
|
149 |
|
150 @code |
|
151 // Lets assume that an application would need to check whether gamma correction is |
|
152 // supported on a particular platform. After obtaining a valid pointer to the interface, |
|
153 // it would call GetSupportedTransformationsL() to obtain the list of the supported |
|
154 // transformations and check whether KUidECamEventImageProcessingAdjustGamma |
|
155 // is in the list. If it is then call SetTranformationValue(KUidECamEventImageProcessingAdjustGamma, 200); |
|
156 // to set the new value. A notification will be generated to the client to indicate success. |
|
157 |
|
158 RArray<TUid> suppTransforms; // array of supported transformations |
|
159 CleanupClosePushL(suppTransforms); |
|
160 |
|
161 imageProcess->GetSupportedTransformationsL(suppTransfUids); |
|
162 ... |
|
163 // if the gamma is supported |
|
164 TInt gammaCorrection = 200; // gamma correction of 2.0 |
|
165 imageProcess->SetTranformationValue(KUidECamEventImageProcessingAdjustGamma, gammaCorrection); |
|
166 ... |
|
167 // pop stack to close the RArray |
|
168 @endcode |
|
169 |
|
170 @note If the class methods leave, the output type parameter value is not guaranteed to be valid. |
|
171 |
|
172 @publishedAll |
|
173 @released |
|
174 */ |
|
175 class CCamera::CCameraImageProcessing : public CBase |
|
176 { |
|
177 |
|
178 // so can use internal factory functions etc. |
|
179 friend class CCamera; |
|
180 |
|
181 public: |
|
182 |
|
183 /** Gamma settings */ |
|
184 enum TGamma |
|
185 { |
|
186 /** Sets the gamma adjustment automatically. */ |
|
187 EGammaAuto = KMinTInt |
|
188 }; |
|
189 /** Sharpness Settings */ |
|
190 enum TSharpness |
|
191 { |
|
192 /** Sets the sharpness adjustment automatically. */ |
|
193 ESharpnessAuto = KMinTInt |
|
194 }; |
|
195 /** Saturation Settings */ |
|
196 enum TSaturation |
|
197 { |
|
198 /** Sets the saturation adjustment automatically. */ |
|
199 ESaturationAuto = KMinTInt |
|
200 }; |
|
201 /** Hue Settings */ |
|
202 enum THue |
|
203 { |
|
204 /** Sets the hue adjustment automatically. */ |
|
205 EHueAuto = KMinTInt |
|
206 }; |
|
207 |
|
208 /** Settings for the supported effects */ |
|
209 enum TEffect |
|
210 { |
|
211 /** Effects off is default, always supported */ |
|
212 EEffectNone = 0x00000000, |
|
213 /** Negative visual effect. */ |
|
214 EEffectNegative = 0x00000001, |
|
215 /** Black and white visual effect. */ |
|
216 EEffectMonochrome = 0x00000002, |
|
217 /** Solarization visual effect. */ |
|
218 EEffectSolarize = 0x00000004, |
|
219 /** Sepia visual effect. */ |
|
220 EEffectSepia = 0x00000008, |
|
221 /** Emboss visual effect. */ |
|
222 EEffectEmboss = 0x00000010, |
|
223 /** Red eye glare reduction visual effect. */ |
|
224 EEffectRedEyeReduction = 0x00000020, |
|
225 /** Vivid colour visual effect. */ |
|
226 EEffectVivid = 0x00000040, |
|
227 /** Neutral colour visual effect. */ |
|
228 EEffectNeutral = 0x00000080, |
|
229 /** Selective sharpening visual effect. */ |
|
230 EEffectLowSharpening = 0x00000100, |
|
231 /** |
|
232 Natural visual effect. |
|
233 |
|
234 This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or |
|
235 CCamera::NewDuplicate2L(). |
|
236 |
|
237 */ |
|
238 EEffectNatural = 0x00000200, |
|
239 /** |
|
240 Cine visual effect. |
|
241 |
|
242 This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or |
|
243 CCamera::NewDuplicate2L(). |
|
244 |
|
245 */ |
|
246 EEffectCine = 0x00000400, |
|
247 /** |
|
248 Old film visual effect. |
|
249 |
|
250 This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or |
|
251 CCamera::NewDuplicate2L(). |
|
252 |
|
253 */ |
|
254 EEffectOldFilm = 0x00000800, |
|
255 /** |
|
256 Color swap visual effect. |
|
257 |
|
258 This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or |
|
259 CCamera::NewDuplicate2L(). |
|
260 |
|
261 */ |
|
262 EEffectColorSwap = 0x00001000, |
|
263 /** |
|
264 Where a list of color can be kept as they are and the rest converted to gray. |
|
265 |
|
266 This enum value is available from the 'supported' or 'getter' methods only to the API clients using CCamera::New2L() or |
|
267 CCamera::NewDuplicate2L(). |
|
268 |
|
269 */ |
|
270 EEffectColorAccent = 0x00002000 |
|
271 }; |
|
272 |
|
273 /** Mirror settings */ |
|
274 enum TMirror |
|
275 { |
|
276 /** Default value. Mirroring is disabled. */ |
|
277 EMirrorNone = 0x00000000, |
|
278 /** Mirror along horizontal axis. */ |
|
279 EMirrorHorizontal = 0x00000001, |
|
280 /** Mirror along vertical axis. */ |
|
281 EMirrorVertical = 0x00000002, |
|
282 /** Mirror along horizontal and vertical axis. */ |
|
283 EMirrorBoth = 0x00000003 |
|
284 }; |
|
285 |
|
286 /** Noise filter settings */ |
|
287 enum TNoiseReduction |
|
288 { |
|
289 /** Default value. Noise reduction disabled. */ |
|
290 ENoiseReductionNone = 0x0000, |
|
291 /** most basic noise reduction. */ |
|
292 ENoiseReductionBasic = 0x0001 |
|
293 }; |
|
294 |
|
295 /** Glare reduction settings */ |
|
296 enum TGlareReduction |
|
297 { |
|
298 /** Default value. Glare reduction disabled. */ |
|
299 EGlareReductionNone = 0x0000, |
|
300 /** most basic glare reduction. */ |
|
301 EGlareReductionBasic = 0x0001 |
|
302 }; |
|
303 |
|
304 /** |
|
305 Used for color swap and color accent feature in TEffect. It describes whether the given source |
|
306 or target color represents itself or a group of color. |
|
307 |
|
308 */ |
|
309 enum TColorOperationRepresentation |
|
310 { |
|
311 /** Feature is not supported */ |
|
312 ERepresentationNone = 0x00, |
|
313 /** The given color is uniquely represented */ |
|
314 ERepresentationSingle = 0x01, |
|
315 /** The given color represents a group of colors */ |
|
316 ERepresentationMultiple = 0x02 |
|
317 }; |
|
318 |
|
319 /** |
|
320 Used for color swap and color accent feature in TEffect. It describes the type of grouping for |
|
321 source and target colors when they represent a group of color. |
|
322 |
|
323 */ |
|
324 enum TColorOperationRgbGroupingMode |
|
325 { |
|
326 /** Feature is not supported */ |
|
327 ERgbGroupingNone = 0x00, |
|
328 /** This means no neighbourhood colors are considered */ |
|
329 ERgbGroupingFixed = 0x01, |
|
330 /** This means neighbourhood colors are to be automatically decided by the implementation or hardware */ |
|
331 ERgbGroupingAutomatic = 0x02, |
|
332 /** This means neighbourhood colors for source have to be decided by ignoring few starting bits. Used for source only */ |
|
333 ERgbGroupingSignificantBits = 0x04, |
|
334 /** This means colors in target are obtained as some uniform proportion using source. Used for target only */ |
|
335 ERgbGroupingUniform = 0x08 |
|
336 }; |
|
337 |
|
338 /** |
|
339 Used to provide different types of references for orientation of images retrieved. These references are the various |
|
340 means by the orientation of an image can be defined. Client needs to choose a particular TOrientationReference and |
|
341 specify any relative rotation, mirroring and flipping on top of it. |
|
342 |
|
343 This enumeration has nothing to do with absolute rotation. Uid KUidECamEventImageProcessingTransformRotate is used |
|
344 for absolute rotation purposes. |
|
345 |
|
346 The enumeration list may be extended in future. |
|
347 |
|
348 @publishedPartner |
|
349 @prototype |
|
350 */ |
|
351 enum TOrientationReference |
|
352 { |
|
353 /** The retrieved images will follow the camera sensor orientation. This orientation would be relative |
|
354 to the current screen mode as given by the reference screen. */ |
|
355 EOrientationReferenceCameraSensorOrientation, |
|
356 |
|
357 /** The retrieved images will get oriented as per the tilt sensor information. |
|
358 So,the orientation would be relative to the current screen mode as given by the reference screen. */ |
|
359 EOrientationReferenceTiltOrientation |
|
360 }; |
|
361 |
|
362 /** |
|
363 Used to describe the various relative rotation. The term 'relative' means that the rotation is applied after the |
|
364 image undergoes orientation as given by TOrientationReference. |
|
365 |
|
366 The enumeration list may be extended in future. |
|
367 |
|
368 @publishedPartner |
|
369 @prototype |
|
370 */ |
|
371 enum TRelativeRotation |
|
372 { |
|
373 /** Zero degree Rotation applied on top of orientation reference and is relative to current reference screen. */ |
|
374 ERelativeRotation0Degrees = 0x00, |
|
375 /** 90 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen. */ |
|
376 ERelativeRotation90DegreesClockwise = 0x01, |
|
377 /** 180 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen. */ |
|
378 ERelativeRotation180DegreesClockwise = 0x02, |
|
379 /** 270 degree clockwise Rotation applied on top of orientation reference and is relative to current reference screen. */ |
|
380 ERelativeRotation270DegreesClockwise = 0x04 |
|
381 }; |
|
382 |
|
383 /** |
|
384 Used to describe the various relative mirroring. The term 'relative' means that the mirroring is applied after the |
|
385 image undergoes orientation as given by TOrientationReference. |
|
386 |
|
387 The enumeration list may be extended in future. |
|
388 |
|
389 @publishedPartner |
|
390 @prototype |
|
391 */ |
|
392 enum TRelativeMirror |
|
393 { |
|
394 /** No mirroring. */ |
|
395 ERelativeMirrorNone = 0x00, |
|
396 /** Used to mirror an image about the horizontal axis. This is applied on top of orientation reference and is |
|
397 relative to current reference screen. */ |
|
398 ERelativeMirrorHorizontalAxis = 0x10, |
|
399 /** Used to mirror an image about the vertical axis. This is applied on top of orientation reference and is |
|
400 relative to current reference screen. */ |
|
401 ERelativeMirrorVerticalAxis = 0x20 |
|
402 }; |
|
403 |
|
404 /** |
|
405 Used to describe the various relative flipping. The term 'relative' means that the flipping is applied after the |
|
406 image undergoes orientation as given by TOrientationReference. |
|
407 |
|
408 The enumeration list may be extended in future. |
|
409 |
|
410 @publishedPartner |
|
411 @prototype |
|
412 */ |
|
413 enum TRelativeFlipping |
|
414 { |
|
415 /** No flipping. */ |
|
416 ERelativeFlippingNone = 0x00, |
|
417 /** Used to flip an image horizontally. This is applied on top of orientation reference and is relative to current |
|
418 reference screen. */ |
|
419 ERelativeFlippingHorizontal = 0x10, |
|
420 /** Used to flip an image vertically. This is applied on top of orientation reference and is relative to current |
|
421 reference screen. */ |
|
422 ERelativeFlippingVertical = 0x20 |
|
423 }; |
|
424 |
|
425 /** |
|
426 Different types of contrast enhancement options. |
|
427 The enumeration list may be extended in future. |
|
428 |
|
429 @publishedPartner |
|
430 @prototype |
|
431 */ |
|
432 enum TContrastEnhancement |
|
433 { |
|
434 /** Not Supported. */ |
|
435 EContrastEnhancementNone =0x00, |
|
436 /** Contrast Enhancement switched off. */ |
|
437 EContrastEnhancementSwitchOff =0x01, |
|
438 /** Contrast Enhacement switched On manually. */ |
|
439 EContrastEnhancementManualSwitchOn =0x02, |
|
440 /** Contrast Enhancement in auto mode. */ |
|
441 EContrastEnhancementSwitchAuto =0x04 |
|
442 }; |
|
443 |
|
444 /** |
|
445 Different types of software-based red eye reduction options. |
|
446 The enumeration list may be extended in future. |
|
447 |
|
448 @publishedPartner |
|
449 @prototype |
|
450 */ |
|
451 enum TRedEyeReduction |
|
452 { |
|
453 /** Not Supported. */ |
|
454 ERedEyeReductionNone =0x00, |
|
455 /** Software based Red Eye Reduction can be switched off(disabled). */ |
|
456 ERedEyeReductionSwitchOff =0x01, |
|
457 /** Software based Red Eye Reduction can be switched on (enabled). */ |
|
458 ERedEyeReductionManualSwitchOn =0x02, |
|
459 /** Software based Red Eye Reduction can be put to auto mode. */ |
|
460 ERedEyeReductionSwitchAuto =0x04 |
|
461 }; |
|
462 |
|
463 /** |
|
464 Color operation capabilities characterizing both color swap and color accent feature |
|
465 |
|
466 */ |
|
467 class TColorOperationCapabilities |
|
468 { |
|
469 public: |
|
470 /** |
|
471 Constructor. |
|
472 Sets the size of this class in iSize. |
|
473 */ |
|
474 IMPORT_C TColorOperationCapabilities(); |
|
475 |
|
476 IMPORT_C TInt Size() const; |
|
477 IMPORT_C TUint Version() const; |
|
478 |
|
479 private: |
|
480 //for future expansion |
|
481 TUint iSize:24; |
|
482 TUint iVersion:8; |
|
483 |
|
484 // reserved for future expansion |
|
485 TInt iReserved; |
|
486 |
|
487 public: |
|
488 /** The source color representation that the server supports. |
|
489 The supported representations are held as a bitwise logical OR of the relevant individual modes |
|
490 defined in CCamera::CCameraImageProcessing:: TColorOperationRepresentation. */ |
|
491 TUint iSupportedSourceRepresentation; |
|
492 |
|
493 /** The target color representation that the server supports. |
|
494 The supported representations are held as a bitwise logical OR of the relevant individual modes |
|
495 defined in CCamera::CCameraImageProcessing:: TColorOperationRepresentation. |
|
496 Not applicable for color accent */ |
|
497 TUint iSupportedTargetRepresentation; |
|
498 |
|
499 /** The source color Rgb grouping modes that the server supports. |
|
500 The modes are held as a bitwise logical OR of the relevant individual modes |
|
501 defined in CCamera::CCameraImageProcessing:: TColorOperationRgbGroupingMode. */ |
|
502 TUint iSupportedSourceRgbGroupingMode; |
|
503 |
|
504 /** The target color Rgb grouping modes that the server supports. |
|
505 The modes are held as a bitwise logical OR of the relevant individual modes |
|
506 defined in CCamera::CCameraImageProcessing:: TColorOperationRgbGroupingMode. |
|
507 Not applicable for color accent */ |
|
508 TUint iSupportedTargetRgbGroupingMode; |
|
509 |
|
510 /** This indicates whether the mapping mode and Rgb grouping mode uniform for every color entry */ |
|
511 TBool iIsCapabilityUniform; |
|
512 }; |
|
513 |
|
514 /** |
|
515 Class used to control the number of bits to ignore for Red, Green, Blue or Alpha. |
|
516 This may be used when deciding for neighbourhood for source color in case of color swap and color accent feature |
|
517 |
|
518 */ |
|
519 class TBitsIgnore |
|
520 { |
|
521 public: |
|
522 /** |
|
523 Constructor. |
|
524 Sets the size of this class in iSize. |
|
525 */ |
|
526 IMPORT_C TBitsIgnore(); |
|
527 |
|
528 IMPORT_C TInt Size() const; |
|
529 IMPORT_C TUint Version() const; |
|
530 |
|
531 private: |
|
532 //for future expansion |
|
533 TUint iSize:24; |
|
534 TUint iVersion:8; |
|
535 |
|
536 // for future use |
|
537 TUint iReservedBits:16; |
|
538 |
|
539 public: |
|
540 /** This gives the no. of bits to ignore for Red color. Varies from 0 to 8. |
|
541 Any other value should be an error */ |
|
542 TUint iRedBitsIgnore:4; |
|
543 |
|
544 /** This gives the no. of bits to ignore for Green color. Varies from 0 to 8. |
|
545 Any other value should be an error */ |
|
546 TUint iGreenBitsIgnore:4; |
|
547 |
|
548 /** This gives the no. of bits to ignore for Blue color. Varies from 0 to 8. |
|
549 Any other value should be an error */ |
|
550 TUint iBlueBitsIgnore:4; |
|
551 |
|
552 /** This gives the no. of bits to ignore for Alpha. Varies from 0 to 8. |
|
553 Any other value should be an error */ |
|
554 TUint iAlphaBitsIgnore:4; |
|
555 }; |
|
556 |
|
557 /** |
|
558 Color operation parameters characterizing both color swap and color accent feature; and for a particular entry. |
|
559 |
|
560 */ |
|
561 class TColorOperationEntry |
|
562 { |
|
563 public: |
|
564 /** |
|
565 Constructor. |
|
566 Sets the size of this class in iSize. |
|
567 */ |
|
568 IMPORT_C TColorOperationEntry(); |
|
569 |
|
570 IMPORT_C TInt Size() const; |
|
571 IMPORT_C TUint Version() const; |
|
572 |
|
573 private: |
|
574 //for future expansion |
|
575 TUint iSize:24; |
|
576 TUint iVersion:8; |
|
577 |
|
578 // reserved for future expansion |
|
579 TInt iReserved; |
|
580 |
|
581 public: |
|
582 /** The source color (rgb triplet) which is changed to target color in case of Color Swap operation |
|
583 and remains unaffected in case of Color Accent operation */ |
|
584 TRgb iSourceColor; |
|
585 |
|
586 /** The target color (rgb triplet) which replaces the source color in case of Color Swap operation. |
|
587 Redundant for Color Accent operation */ |
|
588 TRgb iTargetColor; |
|
589 |
|
590 /** This defines whether the given source color represents itself or a group of colors */ |
|
591 TColorOperationRepresentation iSourceColorRepresentation; |
|
592 |
|
593 /** This defines whether the given target color represents itself or a group of colors in case of |
|
594 Color Swap operation. Redundant for Color Accent operation */ |
|
595 TColorOperationRepresentation iTargetColorRepresentation; |
|
596 |
|
597 /** This defines the type of grouping for multiple representation of source color */ |
|
598 TColorOperationRgbGroupingMode iColorOperationSourceRgbGroupingMode; |
|
599 |
|
600 /** This defines the type of grouping for multiple representation of target color in case of |
|
601 Color Swap operation. Redundant for Color Accent operation */ |
|
602 TColorOperationRgbGroupingMode iColorOperationTargetRgbGroupingMode; |
|
603 |
|
604 /** This gives the number of bits to ignore in case ERgbGroupingSignificantBits is used for |
|
605 multiple representation of source color. For any other case, no. of bits ignored for red, green, |
|
606 blue or alpha should be 0 */ |
|
607 TBitsIgnore iNumBitsIgnored; |
|
608 |
|
609 /** This gives the entry status of every color operation entry. If entry is not set or removed, |
|
610 this is ENotActive. And if entry is set, then this is EDiscreteSteps */ |
|
611 TValueInfo iEntryStatus; |
|
612 }; |
|
613 |
|
614 public: |
|
615 |
|
616 IMPORT_C static CCameraImageProcessing* NewL(CCamera& aCamera); |
|
617 |
|
618 IMPORT_C static CCameraImageProcessing* CreateL(CCamera& aCamera, MImplementationFactory& aImplFactory); |
|
619 |
|
620 IMPORT_C void GetSupportedTransformationsL(RArray<TUid>& aTransformations) const; |
|
621 |
|
622 IMPORT_C void GetActiveTransformationsL(RArray<TUid>& aTransformations) const; |
|
623 |
|
624 IMPORT_C void GetTransformationSupportedValuesL(TUid aTransformation, RArray<TInt>& aValues, TValueInfo& aInfo) const; |
|
625 |
|
626 IMPORT_C TInt TransformationValue(TUid aTransformation) const; |
|
627 |
|
628 IMPORT_C TInt GetTransformationValue(TUid aTransformation, TInt& aTransformationValue) const; |
|
629 |
|
630 IMPORT_C void SetTransformationValue(TUid aTransformation, TInt aValue); |
|
631 |
|
632 IMPORT_C void GetActiveTransformSequenceL(RArray<TUid>& aTransformSequence) const; |
|
633 |
|
634 IMPORT_C void SetActiveTransformSequenceL(RArray<TUid>& aTransformSequence); |
|
635 |
|
636 IMPORT_C void SetSourceRect(const TRect& aRect); |
|
637 |
|
638 IMPORT_C void GetSourceRect(TRect& aRect) const; |
|
639 |
|
640 IMPORT_C ~CCameraImageProcessing(); |
|
641 |
|
642 IMPORT_C void GetConcurrentColorSwappingsSupportedL(TInt& aConcurrentColorSwappingSupported) const; |
|
643 |
|
644 IMPORT_C void GetColorSwapCapabilitiesL(TInt aIndex, TColorOperationCapabilities& aColorSwapCapabilities) const; |
|
645 |
|
646 IMPORT_C void SetColorSwapEntryL(TInt aIndex, const TColorOperationEntry& aColorSwapParameters); |
|
647 |
|
648 IMPORT_C void RemoveColorSwapEntryL(TInt aIndex); |
|
649 |
|
650 IMPORT_C void GetColorSwapEntryL(TInt aIndex, TColorOperationEntry& aColorSwapParameters) const; |
|
651 |
|
652 IMPORT_C void StartColorSwappingL(); |
|
653 |
|
654 IMPORT_C void CancelColorSwappingL(); |
|
655 |
|
656 IMPORT_C void GetConcurrentColorAccentSupportedL(TInt& aConcurrentColorAccentSupported) const; |
|
657 |
|
658 IMPORT_C void GetColorAccentCapabilitiesL(TInt aIndex, TColorOperationCapabilities& aColorAccentCapabilities) const; |
|
659 |
|
660 IMPORT_C void SetColorAccentEntryL(TInt aIndex, const TColorOperationEntry& aColorAccentParameters); |
|
661 |
|
662 IMPORT_C void RemoveColorAccentEntryL(TInt aIndex); |
|
663 |
|
664 IMPORT_C void GetColorAccentEntryL(TInt aIndex, TColorOperationEntry& aColorAccentParameters) const; |
|
665 |
|
666 IMPORT_C void StartColorAccentL(); |
|
667 |
|
668 IMPORT_C void CancelColorAccentL(); |
|
669 |
|
670 IMPORT_C void GetSupportedRelativeOrientationOptionsL(TOrientationReference aOrientationReference, |
|
671 TUint& aSupportedRelativeRotation, TUint& aSupportedRelativeMirroring, TUint& aSupportedRelativeFlipping) const; |
|
672 |
|
673 IMPORT_C void GetCurrentRelativeOrientationOptionsL(TOrientationReference& aOrientationReference, |
|
674 TRelativeRotation& aRelativeRotation, TRelativeMirror& aRelativeMirror, TRelativeFlipping& aRelativeFlipping) const; |
|
675 |
|
676 IMPORT_C void SetRelativeOrientationOptionsL(TOrientationReference aOrientationReference, |
|
677 TRelativeRotation aRelativeRotation, TRelativeMirror aRelativeMirror, TRelativeFlipping aRelativeFlipping); |
|
678 |
|
679 private: |
|
680 CCameraImageProcessing(CCamera& aOwner); |
|
681 void ConstructL(); |
|
682 void ConstructL(const MImplementationFactory& aImplFactory); |
|
683 |
|
684 private: |
|
685 CCamera& iOwner; |
|
686 MCameraImageProcessing* iImpl; // not owned |
|
687 MCameraImageProcessing2* iImpl2; //not owned |
|
688 MCameraImageProcessing3* iImpl3; //not owned |
|
689 }; |
|
690 #endif//ECAMIMAGEPROCESSING_H |
|
691 |
|
692 |
|
693 |