|
1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __CJPEGSCALE_H__ |
|
21 #define __CJPEGSCALE_H__ |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class MJpegScaleCallBack |
|
26 { |
|
27 public: |
|
28 virtual ~MJpegScaleCallBack() {} |
|
29 virtual void JpegStatusCallBack( TInt aPercentReady ); |
|
30 }; |
|
31 |
|
32 |
|
33 |
|
34 class CJpegScale |
|
35 : public CBase |
|
36 { |
|
37 public: |
|
38 /// Default constructor |
|
39 /// @param aCallBack status callback, tells conversion status percentage. Not mandatory |
|
40 CJpegScale( MJpegScaleCallBack* aCallBack = 0 ); |
|
41 ~CJpegScale(); |
|
42 public: |
|
43 |
|
44 /// Scales jpeg iSourceName to iTargetName |
|
45 /// target size will be of iTargetScale |
|
46 /// if iTargetScale = 0 then iTargetSize is used |
|
47 /// can leave with common error codes |
|
48 /// Only downscaling supported |
|
49 void ScaleL(); |
|
50 |
|
51 public: |
|
52 TFileName iSourceName; /// source file name |
|
53 TFileName iTargetName; /// target file name |
|
54 TReal iTargetScale; /// target jpeg scale, 1.0 = 1:1 , if 0.0 then iTargetSize used instead |
|
55 TSize iTargetSize; /// target jpeg size in pixels |
|
56 TInt iQuality; /// target jpeg quality 0..100 default 95 |
|
57 |
|
58 private: |
|
59 MJpegScaleCallBack* iCallBack; |
|
60 |
|
61 |
|
62 }; |
|
63 |
|
64 #endif |