|
1 // Copyright (c) 1999-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 #ifndef __ICOCODEC_H__ |
|
17 #define __ICOCODEC_H__ |
|
18 |
|
19 #include <bitdev.h> |
|
20 #include <icl/imageprocessor.h> |
|
21 #include <icl/imagecodec.h> |
|
22 |
|
23 #include "ICOConvert.h" |
|
24 |
|
25 |
|
26 // Ico Read codec. |
|
27 class CIcoReadCodec : public CImageMaskProcessorReadCodec |
|
28 { |
|
29 public: |
|
30 // From CImageReadCodec |
|
31 virtual void InitFrameL(TFrameInfo& aFrameInfo, CFrameImageData& aFrameImageData, TBool aDisableErrorDiffusion, CFbsBitmap& aDestination, CFbsBitmap* aDestinationMask); |
|
32 |
|
33 ~CIcoReadCodec(); |
|
34 static CIcoReadCodec* NewL(TInt aIconHeadersToProcess); |
|
35 |
|
36 private: |
|
37 CIcoReadCodec(TInt aIconHeadersToProcess); |
|
38 |
|
39 protected: |
|
40 // from CImageReadCodec |
|
41 virtual void InitFrameHeader(TFrameInfo& aFrameSettings, CFrameImageData& aFrameImageData); |
|
42 TFrameState ProcessFrameHeaderL(TBufPtr8& aData); |
|
43 TFrameState ProcessFrameL(TBufPtr8& aSrc); |
|
44 |
|
45 // New |
|
46 void DoProcessL(); |
|
47 |
|
48 void WritePixels(TInt aNumPixels,TBool aUpdatePos = ETrue); |
|
49 protected: |
|
50 TInt iImageDataBytes; |
|
51 TInt iIconHeadersToProcess; |
|
52 TFrameInfo* iFrameInfo; |
|
53 TBool iNewFrame; |
|
54 TRgb iPalette[256]; |
|
55 TUint8* iDataPtr; |
|
56 TUint8* iDataPtrLimit; |
|
57 TInt iBmpBytesExpected; |
|
58 TInt iMaskBytesExpected; |
|
59 |
|
60 |
|
61 }; |
|
62 |
|
63 #endif // __ICOCODEC_H__ |
|
64 |