Ocean
Loading...
Searching...
No Matches
android/Bitmap.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_PLATFORM_ANDROID_BITMAP_H
9#define META_OCEAN_PLATFORM_ANDROID_BITMAP_H
10
12
13#include "ocean/base/Frame.h"
14
15#include <android/bitmap.h>
16
17namespace Ocean
18{
19
20namespace Platform
21{
22
23namespace Android
24{
25
26/**
27 * This class implements bitmap functions.
28 * @ingroup platformandroid
29 */
30class OCEAN_PLATFORM_ANDROID_EXPORT Bitmap
31{
32 public:
33
34 /**
35 * Translates an Android bitmap format to an Ocean pixel format.
36 * @param format The Android bitmap format to translate
37 * @return The corresponding Ocean pixel format, FORMAT_UNDEFINED if unknown
38 */
39 static FrameType::PixelFormat translateFormat(const AndroidBitmapFormat format);
40
41 /**
42 * Translates an Ocean pixel format to an Android bitmap format.
43 * @param pixelFormat The Ocean pixel format to translate
44 * @return The corresponding Android bitmap format, ANDROID_BITMAP_FORMAT_NONE if unknown
45 */
46 static AndroidBitmapFormat translateFormat(const FrameType::PixelFormat pixelFormat);
47};
48
49}
50
51}
52
53}
54
55#endif // META_OCEAN_PLATFORM_ANDROID_BITMAP_H
PixelFormat
Definition of all pixel formats available in the Ocean framework.
Definition Frame.h:183
This class implements bitmap functions.
Definition android/Bitmap.h:31
static AndroidBitmapFormat translateFormat(const FrameType::PixelFormat pixelFormat)
Translates an Ocean pixel format to an Android bitmap format.
static FrameType::PixelFormat translateFormat(const AndroidBitmapFormat format)
Translates an Android bitmap format to an Ocean pixel format.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15