Dali 3D User Interface Engine
image-loaders.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #ifndef __DALI_ADAPTOR_TET_IMAGE_LOADERS_H_
19 #define __DALI_ADAPTOR_TET_IMAGE_LOADERS_H_
20 
21 #include <dali/dali.h>
25 
26 // Simple structure to close the file when finished with it.
28 {
29  AutoCloseFile( FILE *fp );
31  FILE* filePtr;
32 };
33 
36 {
44  ImageDetails( const char * const _name, unsigned int _width, unsigned int _height );
45 
56  ImageDetails( const char * const _name, unsigned int _width, unsigned int _height, unsigned int _reportedWidth, unsigned int _reportedHeight );
57 
61  ~ImageDetails();
62 
63 
64  std::string name;
65  unsigned int width;
66  unsigned int height;
67  unsigned int reportedWidth;
68  unsigned int reportedHeight;
69  unsigned int refBufferSize;
71 
72 private:
73 
77  void LoadBuffer();
78 };
79 
85 {
87  typedef bool (*LoadBitmapHeaderFunction)( const Dali::TizenPlatform::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
88 
92 };
93 
94 // Helper method to test each image file.
104 
112 void CompareLoadedImageData( const ImageDetails& image, const LoadFunctions& functions, const uint32_t* master );
113 
123 void DumpImageBufferToTempFile( std::string filename, std::string targetFilename, const LoadFunctions& functions );
124 
125 #endif // __DALI_ADAPTOR_TET_IMAGE_LOADERS_H_
Dali Docs Home
Read more about Dali