HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImfRgba.h
Go to the documentation of this file.
1 //
2 // SPDX-License-Identifier: BSD-3-Clause
3 // Copyright (c) Contributors to the OpenEXR Project.
4 //
5 
6 #ifndef INCLUDED_IMF_RGBA_H
7 #define INCLUDED_IMF_RGBA_H
8 
9 //-----------------------------------------------------------------------------
10 //
11 // class Rgba
12 //
13 //-----------------------------------------------------------------------------
14 
15 #include "ImfExport.h"
16 #include "ImfNamespace.h"
17 
18 #include <half.h>
19 
21 
22 
23 //
24 // RGBA pixel
25 //
26 
27 struct Rgba
28 {
33 
34  Rgba () {}
35  Rgba (half r, half g, half b, half a = 1.f): r (r), g (g), b (b), a (a) {}
36 };
37 
38 
39 //
40 // Channels in an RGBA file
41 //
42 
44 {
45  WRITE_R = 0x01, // Red
46  WRITE_G = 0x02, // Green
47  WRITE_B = 0x04, // Blue
48  WRITE_A = 0x08, // Alpha
49 
50  WRITE_Y = 0x10, // Luminance, for black-and-white images,
51  // or in combination with chroma
52 
53  WRITE_C = 0x20, // Chroma (two subsampled channels, RY and BY,
54  // supported only for scanline-based files)
55 
56  WRITE_RGB = 0x07, // Red, green, blue
57  WRITE_RGBA = 0x0f, // Red, green, blue, alpha
58 
59  WRITE_YC = 0x30, // Luminance, chroma
60  WRITE_YA = 0x18, // Luminance, alpha
61  WRITE_YCA = 0x38 // Luminance, chroma, alpha
62 };
63 
64 
66 
67 
68 
69 
70 
71 #endif
#define IMF_EXPORT_ENUM
Definition: ImfExport.h:56
Rgba()
Definition: ImfRgba.h:34
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition: ImfNamespace.h:80
half b
Definition: ImfRgba.h:31
WRITE_C
Definition: ImfRgba.h:53
imath_half_bits_t half
if we're in a C-only context, alias the half bits type to half
Definition: half.h:266
WRITE_A
Definition: ImfRgba.h:48
GLboolean GLboolean g
Definition: glcorearb.h:1222
WRITE_R
Definition: ImfRgba.h:45
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
WRITE_YC
Definition: ImfRgba.h:59
Rgba(half r, half g, half b, half a=1.f)
Definition: ImfRgba.h:35
WRITE_Y
Definition: ImfRgba.h:50
half g
Definition: ImfRgba.h:30
GLfloat f
Definition: glcorearb.h:1926
WRITE_YA
Definition: ImfRgba.h:60
half a
Definition: ImfRgba.h:32
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
half r
Definition: ImfRgba.h:29
WRITE_B
Definition: ImfRgba.h:47
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition: ImfNamespace.h:79
Definition: ImfRgba.h:27
WRITE_RGB
Definition: ImfRgba.h:56
GLboolean r
Definition: glcorearb.h:1222
enum IMF_EXPORT_ENUM RgbaChannels
Definition: ImfRgba.h:43
WRITE_RGBA
Definition: ImfRgba.h:57
WRITE_G
Definition: ImfRgba.h:46