2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #include "bitmap-loader.h"
23 #include <dali/integration-api/bitmap.h>
24 #include <dali/integration-api/resource-types.h>
25 #include <dali/integration-api/resource-cache.h>
28 #include "image-loaders/image-loader.h"
29 #include <bitmap-loader-impl.h>
34 BitmapLoader BitmapLoader::New(const std::string& filename)
36 IntrusivePtr<Internal::BitmapLoader> internal = Internal::BitmapLoader::New(filename);
37 return BitmapLoader( internal.Get() );
40 BitmapLoader::BitmapLoader()
44 BitmapLoader::BitmapLoader(Internal::BitmapLoader* internal)
45 : BaseHandle( internal )
49 BitmapLoader::~BitmapLoader()
53 BitmapLoader::BitmapLoader( const BitmapLoader& handle )
54 : BaseHandle( handle )
58 BitmapLoader& BitmapLoader::operator=(const BitmapLoader& rhs)
60 BaseHandle::operator=(rhs);
64 unsigned char* BitmapLoader::GetPixelData() const
66 return GetImplementation(*this).GetPixelData();
69 unsigned int BitmapLoader::GetImageHeight() const
71 return GetImplementation(*this).GetImageHeight();
74 unsigned int BitmapLoader::GetImageWidth() const
76 return GetImplementation(*this).GetImageWidth();
79 unsigned int BitmapLoader::GetBufferStride() const
81 return GetImplementation(*this).GetBufferStride();
84 Pixel::Format BitmapLoader::GetPixelFormat() const
86 return GetImplementation(*this).GetPixelFormat();