|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "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 * |
|
14 * Description: Pure virtual interface for file based external jpg image class. |
|
15 * : This class acts as a window into single image or animation |
|
16 * : in one physical file. Note that file will be locked as long |
|
17 * : as instance of this class is present. |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef MIHLFILEIMAGEEXTJPG_H |
|
23 #define MIHLFILEIMAGEEXTJPG_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <MIHLFileImage.h> |
|
27 #include <gdi.h> |
|
28 |
|
29 // FORWARD DECLARATION |
|
30 class MIHLBitmap; |
|
31 class MIHLFilter; |
|
32 class CVisualFrame; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 /** |
|
36 * MIHLFileImageExtJpg |
|
37 * |
|
38 * Pure virtual interface for file based image class that uses IclExtJpegApi. |
|
39 * This class acts as a window into single image or animation |
|
40 * in one physical file. Note that file will be locked as long |
|
41 * as instance of this class is present. |
|
42 * |
|
43 * If interface needs to be pushed into CleanupStack, |
|
44 * remember to use CleanupDeletePushL() function! |
|
45 * DO NOT USE CleanupStack::PushL()!! |
|
46 * |
|
47 * @lib IHL.lib |
|
48 * @since 3.0 |
|
49 */ |
|
50 class MIHLFileImageExtJpg : public MIHLFileImage |
|
51 { |
|
52 public: |
|
53 |
|
54 /** |
|
55 * Virtual destructor. |
|
56 */ |
|
57 virtual ~MIHLFileImageExtJpg() {} |
|
58 |
|
59 public: |
|
60 /** |
|
61 * Load part of the image into bitmap. |
|
62 * @since 3.0 |
|
63 * @param aSrcRect Part of the picture to be loaded |
|
64 * @param aStatus Load request status reference. |
|
65 * @param aDestination Destination bitmap reference. |
|
66 * @param aFrameIndex frame index for loading single frame from image |
|
67 * @return Return system wide error codes: |
|
68 * KerrArgument if given bitmap is not created or it's size is incorrect. |
|
69 * KErrBusy image has load request pending already. |
|
70 */ |
|
71 virtual TInt Load( TRect aSrcRect, TRequestStatus& aStatus, MIHLBitmap& aDestination, TInt aFrameIndex = 0 ) = 0; |
|
72 |
|
73 public: //CExtJpegDecoder wrapper, see IclExtJpegApi.h |
|
74 |
|
75 virtual void SetCroppingL( TRect aCropRect ) = 0; |
|
76 |
|
77 virtual void SetStreamingL( TSize& aMacroBlockSize ) = 0; |
|
78 |
|
79 virtual void SetRotationL( TInt aDegree ) = 0; |
|
80 |
|
81 virtual void SetFlippingL() = 0; |
|
82 |
|
83 virtual void SetMirroringL() = 0; |
|
84 |
|
85 virtual void SetDctDecodingL() = 0; |
|
86 |
|
87 virtual void ConvertL( |
|
88 TRequestStatus* aRequestStatus, |
|
89 const CVisualFrame* aDestinationFrame, |
|
90 TInt& aNoOfDecodedMBlocks, |
|
91 TInt aFrameNumber = 0 ) = 0; |
|
92 |
|
93 virtual void ContinueConvertL( |
|
94 TRequestStatus* aRequestStatus, |
|
95 const CVisualFrame* aDestinationFrame, |
|
96 TInt& aNoOfDecodedMBlocks, |
|
97 TInt aFrameNumber = 0 ) = 0; |
|
98 |
|
99 virtual TInt SupportedFormatsL() = 0; |
|
100 |
|
101 virtual TInt CapabilitiesL() = 0; |
|
102 |
|
103 |
|
104 }; |
|
105 #endif |