c0dd1445fccf55f85059b8427183630b709d8b7e
[platform/core/uifw/dali-adaptor.git] / adaptors / emscripten / wrappers / image-wrapper.h
1 #ifndef __DALI_IMAGE_WRAPPER_H__
2 #define __DALI_IMAGE_WRAPPER_H__
3
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/dali-core.h>
23 #include "emscripten/emscripten.h"
24 #include "emscripten/bind.h"
25
26 // INTERNAL INCLUDES
27
28 namespace Dali
29 {
30 namespace Internal
31 {
32 namespace Emscripten
33 {
34
35 /**
36  * Creates a new buffer image from raw data
37  *
38  * @param[in] data The image byte data
39  * @param[in] width The width of the image
40  * @param[in] height The height of the image
41  * @param[in] pixelFormat The pixel format
42  *
43  * @returns A Dali BufferImage
44  */
45 Dali::BufferImage BufferImageNew(const std::string& data, unsigned int width, unsigned int height, Dali::Pixel::Format pixelFormat);
46
47 /**
48  * Gets an encoded buffer from encoded data
49  *
50  * @param[in] data The image data
51  *
52  * @returns A Dali EncodedBufferImage
53  *
54  */
55 Dali::EncodedBufferImage EncodedBufferImageNew(const std::string& data);
56
57 }; // namespace Emscripten
58 }; // namespace Internal
59 }; // namespace Dali
60
61 #endif // header