1 #ifndef __DALI_INTERNAL_GIF_LOADING_H__
2 #define __DALI_INTERNAL_GIF_LOADING_H__
5 * Copyright (c) 2016 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.
22 #include <dali/public-api/common/dali-vector.h>
23 #include <dali/public-api/common/vector-wrapper.h>
24 #include <dali/public-api/math/uint-16-pair.h>
29 typedef Dali::Uint16Pair ImageDimensions;
32 * @brief Load an animated gif file.
34 * @param[in] url The url of the gif to load.
35 * @param[out] pixelData The loaded pixel data for each frame.
36 * @param[out] frameDelays The loaded delay time for each frame.
38 * @return True if the loading succeeded, false otherwise.
40 DALI_IMPORT_API bool LoadAnimatedGifFromFile( const std::string& url, std::vector<Dali::PixelData>& pixelData, Dali::Vector<uint32_t>& frameDelays );
43 * @brief Get the size of a gif image.
45 * This function will read the header info from file on disk.
47 * @param [in] url The URL of the gif file.
48 * @return The width and height in pixels of the gif image.
50 DALI_IMPORT_API ImageDimensions GetGifImageSize( const std::string& url );
54 #endif // __DALI_INTERNAL_GIF_LOADING_H__