equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MIFCONVMBMGENERATORBMTOPBM_H__ |
|
19 #define __MIFCONVMBMGENERATORBMTOPBM_H__ |
|
20 |
|
21 #include "mifconv_mbmgenerator.h" |
|
22 #include "mifconv.h" |
|
23 |
|
24 struct TRgbQuad |
|
25 { |
|
26 unsigned char iBlue; |
|
27 unsigned char iGreen; |
|
28 unsigned char iRed; |
|
29 unsigned char iReserved; |
|
30 }; |
|
31 |
|
32 class BitmapLoader |
|
33 { |
|
34 public: |
|
35 BitmapLoader(); |
|
36 ~BitmapLoader(); |
|
37 int LoadBitmap(MifConvSourceFile& aFileName,int aBpp,TBitmapColor aColor,SEpocBitmapHeader*& aPbm); |
|
38 private: |
|
39 int DoLoad(const char* aFileName); |
|
40 int DoLoadAlpha(MifConvString& aAlphaFileName); |
|
41 int DoConvert(int aBpp,TBitmapColor aColor,SEpocBitmapHeader*& aPbm); |
|
42 TRgb GetBmpPixel(long aXCoord,long aYCoord); |
|
43 unsigned char GetAlphaPixel(long aXCoord,long aYCoord); |
|
44 private: |
|
45 MifConvSourceFile* iSourceFile; |
|
46 TBitmapInfoHeader iBmpHeader; |
|
47 int iNumBmpColors; |
|
48 TRgbQuad* iBmpColors; |
|
49 char* iBmpBits; |
|
50 char* iAlphaBits; |
|
51 }; |
|
52 |
|
53 #endif |