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 // RGBA pixel
24 //
25 
26 struct Rgba
27 {
32 
33  Rgba () {}
34  Rgba (half r, half g, half b, half a = 1.f) : r (r), g (g), b (b), a (a) {}
35 };
36 
37 //
38 // Channels in an RGBA file
39 //
40 
42 {
43  WRITE_R = 0x01, // Red
44  WRITE_G = 0x02, // Green
45  WRITE_B = 0x04, // Blue
46  WRITE_A = 0x08, // Alpha
47 
48  WRITE_Y = 0x10, // Luminance, for black-and-white images,
49  // or in combination with chroma
50 
51  WRITE_C = 0x20, // Chroma (two subsampled channels, RY and BY,
52  // supported only for scanline-based files)
53 
54  WRITE_RGB = 0x07, // Red, green, blue
55  WRITE_RGBA = 0x0f, // Red, green, blue, alpha
56 
57  WRITE_YC = 0x30, // Luminance, chroma
58  WRITE_YA = 0x18, // Luminance, alpha
59  WRITE_YCA = 0x38 // Luminance, chroma, alpha
60 };
61 
63 
64 #endif
#define IMF_EXPORT_ENUM
Definition: ImfExport.h:56
Rgba()
Definition: ImfRgba.h:33
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition: ImfNamespace.h:83
half b
Definition: ImfRgba.h:30
WRITE_C
Definition: ImfRgba.h:51
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:46
GLboolean GLboolean g
Definition: glcorearb.h:1222
WRITE_R
Definition: ImfRgba.h:43
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
WRITE_YC
Definition: ImfRgba.h:57
Rgba(half r, half g, half b, half a=1.f)
Definition: ImfRgba.h:34
WRITE_Y
Definition: ImfRgba.h:48
half g
Definition: ImfRgba.h:29
GLfloat f
Definition: glcorearb.h:1926
WRITE_YA
Definition: ImfRgba.h:58
half a
Definition: ImfRgba.h:31
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
half r
Definition: ImfRgba.h:28
WRITE_B
Definition: ImfRgba.h:45
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition: ImfNamespace.h:80
Definition: ImfRgba.h:26
WRITE_RGB
Definition: ImfRgba.h:54
GLboolean r
Definition: glcorearb.h:1222
enum IMF_EXPORT_ENUM RgbaChannels
Definition: ImfRgba.h:41
WRITE_RGBA
Definition: ImfRgba.h:55
WRITE_G
Definition: ImfRgba.h:44