|
1 // Copyright (c) 2002-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 // This file contains the TTestImage class which is used to store the name of images and format |
|
15 // parameters for tests |
|
16 // |
|
17 // |
|
18 |
|
19 #ifndef __TESTIMAGEPARAMETER_H__ |
|
20 #define __TESTIMAGEPARAMETER_H__ |
|
21 |
|
22 #include <mdaimageconverter.h> |
|
23 |
|
24 |
|
25 // literals for test images used |
|
26 _LIT(KMediaSvrTest1BppMonoMbm,"mbm1bpp.mbm"); |
|
27 _LIT(KMediaSvrTest2BppMonoMbm,"mbm2bpp.mbm"); |
|
28 _LIT(KMediaSvrTest4BppMonoMbm,"mbm4bppm.mbm"); |
|
29 _LIT(KMediaSvrTest8BppMonoMbm,"mbm8bppm.mbm"); |
|
30 _LIT(KMediaSvrTest4BppColorMbm,"mbm4bppc.mbm"); |
|
31 _LIT(KMediaSvrTest8BppColorMbm,"mbm8bppc.mbm"); |
|
32 _LIT(KMediaSvrTest12BppColorMbm,"mbm12bpp.mbm"); |
|
33 _LIT(KMediaSvrTest16BppColorMbm,"mbm16bpp.mbm"); |
|
34 _LIT(KMediaSvrTest24BppColorMbm,"mbm24bpp.mbm"); |
|
35 |
|
36 _LIT(KMediaSvrTestJfifMono,"jfifMono.jpg"); |
|
37 _LIT(KMediaSvrTestJfif420,"jfif420.jpg"); |
|
38 _LIT(KMediaSvrTestJfif422,"jfif422.jpg"); |
|
39 _LIT(KMediaSvrTestJfif444,"jfif444.jpg"); |
|
40 _LIT(KMediaSvrTestJfif10,"jfif10.jpg"); |
|
41 _LIT(KMediaSvrTestJfif30,"jfif30.jpg"); |
|
42 _LIT(KMediaSvrTestJfif60,"jfif60.jpg"); |
|
43 _LIT(KMediaSvrTestJfif100,"jfif100.jpg"); |
|
44 |
|
45 _LIT(KMediaSvrTest1BppBmp,"bmp1bpp.bmp"); |
|
46 _LIT(KMediaSvrTest4BppBmp,"bmp4bpp.bmp"); |
|
47 _LIT(KMediaSvrTest8BppBmp,"bmp8bpp.bmp"); |
|
48 _LIT(KMediaSvrTest24BppBmp,"bmp24bpp.bmp"); |
|
49 |
|
50 _LIT(KMediaSvrTestPng1,"png1.png"); |
|
51 _LIT(KMediaSvrTestPng2,"png2.png"); |
|
52 _LIT(KMediaSvrTestPng3,"png3.png"); |
|
53 _LIT(KMediaSvrTestPng4,"png4.png"); |
|
54 |
|
55 _LIT(KMediaSvrTestTif1,"tif1.tif"); |
|
56 _LIT(KMediaSvrTestTif2,"tif2.tif"); |
|
57 _LIT(KMediaSvrTestTif3,"tif3.tif"); |
|
58 |
|
59 |
|
60 _LIT(KMediaSvrTestGif1,"trans.gif"); |
|
61 _LIT(KMediaSvrTestTransparentGif,"trans.gif"); |
|
62 |
|
63 _LIT(KMediaSvrTestTxt, "test.txt"); |
|
64 |
|
65 _LIT(KMediaSvrTestGifRef,"ref.gif"); |
|
66 _LIT(KMediaSvrTestPngRef,"ref.png"); |
|
67 |
|
68 _LIT(KMediaSvrGifCommentFile,"GifComment.gif"); |
|
69 _LIT(KMediaSvrGifComment,"Header Comment 1 Block 0 Block 1Header Comment 2 Block 0 Block 1Footer Comment 1 Block 0 Block 1Footer Comment 2 Block 0 Block 1"); |
|
70 |
|
71 _LIT(KMediaSvrInvalidTempFile,"h:\temptest.bmp"); |
|
72 _LIT(KMediaSvrBmpTempFile,"temptest.bmp"); |
|
73 _LIT(KMediaSvrJfifTempFile,"temptest.jpg"); |
|
74 _LIT(KMediaSvrMbmTempFile,"temptest.mbm"); |
|
75 _LIT(KMediaSvrPngTempFile,"temptest.png"); |
|
76 _LIT(KMediaSvrGifTempFile,"temptest.gif"); |
|
77 |
|
78 /** |
|
79 * |
|
80 * class to store image parameters for tests |
|
81 * |
|
82 */ |
|
83 class TTestImage |
|
84 { |
|
85 public: |
|
86 TTestImage(); |
|
87 TTestImage(const TDesC& aSourceFile,const TMdaClipFormat* aFormat,const TMdaPackage* aCodec); |
|
88 TTestImage(const TDesC& aSourceFile,const TMdaClipFormat* aFormat,const TMdaPackage* aCodec, const TDesC& aRefImage); |
|
89 |
|
90 TTestImage(const TTestImage& aTestImage); |
|
91 void SetTestImage(const TDesC& aSourceFile,const TMdaClipFormat* aFormat,const TMdaPackage* aCodec); |
|
92 void SetTestImage(const TDesC& aSourceFile,const TMdaClipFormat* aFormat,const TMdaPackage* aCodec, const TDesC& aRefImage); |
|
93 |
|
94 inline TDesC& SourceFile(); |
|
95 inline TDesC& RefFile(); |
|
96 inline TMdaClipFormat* Format(); |
|
97 inline TMdaPackage* Codec(); |
|
98 |
|
99 private: |
|
100 TDesC* iSourceFile; |
|
101 TDesC* iRefFile; |
|
102 TMdaClipFormat* iFormat; |
|
103 TMdaPackage* iCodec; |
|
104 |
|
105 }; |
|
106 |
|
107 inline TDesC& TTestImage::SourceFile() { return *iSourceFile;} |
|
108 inline TDesC& TTestImage::RefFile() { return *iRefFile;} |
|
109 inline TMdaClipFormat* TTestImage::Format() { return iFormat; } |
|
110 inline TMdaPackage* TTestImage::Codec() { return iCodec;} |
|
111 |
|
112 |
|
113 #endif // __TESTIMAGEPARAMETER_H__ |