1 #ifndef __DALI_EMSCRIPTEN_UTILS_H__
2 #define __DALI_EMSCRIPTEN_UTILS_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 #include <dali/public-api/dali-core.h>
24 #include "emscripten/val.h"
36 * Creates a Dali RGBA Image from raw bytes
38 * @param[in] width The image width
39 * @param[in] height The image height
40 * @param[in] data The byte data
41 * @returns The Dali Image
44 Dali::Image CreateImageRGBA(unsigned int width, unsigned int height, const std::string& data);
47 * Creates a Dali RGB Image from raw bytes
49 * @param[in] width The image width
50 * @param[in] height The image height
51 * @param[in] data The byte data
52 * @returns The Dali Image
55 Dali::Image CreateImageRGB(unsigned int width, unsigned int height, const std::string& data);
58 * Creates a dali Image from encoded bytes (ie jpg/png etc)
60 * @param[in] data The byte data
62 * @returns The Dali Image
65 Dali::Image GetImage(const std::string& data);
67 }; // namespace Emscripten
68 }; // namespace Internal