3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.tizenopensource.org/license
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #ifndef _PIXEL_FORMAT_MAPPER_H_
19 #define _PIXEL_FORMAT_MAPPER_H_
23 #include <FGraphics.h>
25 using namespace Osp::Media;
26 using namespace Osp::Graphics;
27 using namespace Osp::Ui::Controls;
29 class PixelFormatMapper
32 static MediaPixelFormat GetFormat(const Osp::Base::String& src, MediaPixelFormat defVal);
33 static BitmapPixelFormat GetFormat(MediaPixelFormat src, BitmapPixelFormat defVal);
34 static OverlayRegionBufferPixelFormat GetFormat(MediaPixelFormat src, OverlayRegionBufferPixelFormat defVal);
35 static float GetBytesPerPixel(MediaPixelFormat src);
36 static const char* GetFormatString(MediaPixelFormat src, const char* pDefVal);
37 static const char* GetImageFormatString(Osp::Media::ImageFormat fmt);
41 #endif // _PIXEL_FORMAT_MAPPER_H_