MRaster lib 21.0.0.0
Image Processing Library
Loading...
Searching...
No Matches
MRcolor.hpp File Reference

User include file for color types. More...

#include <cstdint>
#include <limits>
#include "MRcolorTpl.hpp"
Include dependency graph for MRcolor.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mjr
 

Macros

#define MJR_INCLUDE_MRcolor
 

Channel Types

typedef uint8_t mjr::colChanI8
 Type suitable for 8-bit unsigned color channels.
 
typedef uint16_t mjr::colChanI16
 Type suitable for 16-bit unsigned color channels.
 
typedef uint32_t mjr::colChanI32
 Type suitable for 32-bit unsigned color channels.
 
typedef uint64_t mjr::colChanI64
 Type suitable for 64-bit unsigned color channels.
 
typedef float mjr::colChanF32
 Type suitable for 32-bit floating point color channels.
 
typedef double mjr::colChanF64
 Type suitable for 64-bit floating point color channels.
 

Complete Color Types

The following types define the most commonly used color/pixel combinations.

typedef colorTpl< colChanI8, 1 > mjr::color1c8b
 colorTpl: 1 Channel @ 8-bit unsigned int 8 – 8-bit Greyscale

 
typedef colorTpl< colChanI8, 2 > mjr::color2c8b
 colorTpl: 2 Channel @ 8-bit unsigned int 16

 
typedef colorTpl< colChanI8, 3 > mjr::color3c8b
 colorTpl: 3 Channel @ 8-bit unsigned int 24 – 24-bit RGB (truecolor)
 
typedef colorTpl< colChanI8, 4 > mjr::color4c8b
 colorTpl: 4 Channel @ 8-bit unsigned int 32 – 24-bit RGBA (truecolor)
 
typedef colorTpl< colChanI8, 5 > mjr::color5c8b
 colorTpl: 5 Channel @ 8-bit unsigned int 40
 
typedef colorTpl< colChanI8, 6 > mjr::color6c8b
 colorTpl: 6 Channel @ 8-bit unsigned int 48
 
typedef colorTpl< colChanI8, 7 > mjr::color7c8b
 colorTpl: 7 Channel @ 8-bit unsigned int 56
 
typedef colorTpl< colChanI8, 8 > mjr::color8c8b
 colorTpl: 8 Channel @ 8-bit unsigned int 64
 
typedef colorTpl< colChanI8, 16 > mjr::color16c8b
 colorTpl: 16 Channel @ 8-bit unsigned int 128
 
typedef colorTpl< colChanI8, 32 > mjr::color32c8b
 colorTpl: 32 Channel @ 8-bit unsigned int 256
 
typedef colorTpl< colChanI8, 64 > mjr::color64c8b
 colorTpl: 64 Channel @ 8-bit unsigned int 512
 
typedef colorTpl< colChanI16, 1 > mjr::color1c16b
 colorTpl: 1 Channel @ 16-bit unsigned int 16 – 16-bit Greyscale

 
typedef colorTpl< colChanI16, 2 > mjr::color2c16b
 colorTpl: 2 Channel @ 16-bit unsigned int 32

 
typedef colorTpl< colChanI16, 3 > mjr::color3c16b
 colorTpl: 3 Channel @ 16-bit unsigned int 48 – 48-bit RGB
 
typedef colorTpl< colChanI16, 4 > mjr::color4c16b
 colorTpl: 4 Channel @ 16-bit unsigned int 64 – 48-bit RGBA
 
typedef colorTpl< colChanI16, 8 > mjr::color8c16b
 colorTpl: 8 Channel @ 16-bit unsigned int 128
 
typedef colorTpl< colChanI16, 16 > mjr::color16c16b
 colorTpl: 16 Channel @ 16-bit unsigned int 256
 
typedef colorTpl< colChanI16, 32 > mjr::color32c16b
 colorTpl: 32 Channel @ 16-bit unsigned int 512
 
typedef colorTpl< colChanI32, 1 > mjr::color1c32b
 colorTpl: 1 Channel @ 32-bit unsigned int 32 – 32-bit Greyscale

 
typedef colorTpl< colChanI32, 2 > mjr::color2c32b
 colorTpl: 2 Channel @ 32-bit unsigned int 64

 
typedef colorTpl< colChanI32, 3 > mjr::color3c32b
 colorTpl: 3 Channel @ 32-bit unsigned int 96 – 96-bit RGB
 
typedef colorTpl< colChanI32, 4 > mjr::color4c32b
 colorTpl: 4 Channel @ 32-bit unsigned int 128 – 96-bit RGBA
 
typedef colorTpl< colChanI32, 8 > mjr::color8c32b
 colorTpl: 8 Channel @ 32-bit unsigned int 256
 
typedef colorTpl< colChanI32, 16 > mjr::color16c32b
 colorTpl: 16 Channel @ 32-bit unsigned int 512
 
typedef colorTpl< colChanI64, 1 > mjr::color1c64b
 colorTpl: 1 Channel @ 64-bit unsigned int 64 – 64-bit Greyscale

 
typedef colorTpl< colChanI64, 2 > mjr::color2c64b
 colorTpl: 2 Channel @ 64-bit unsigned int 128

 
typedef colorTpl< colChanI64, 3 > mjr::color3c64b
 colorTpl: 3 Channel @ 64-bit unsigned int 192 – 192-bit RGB
 
typedef colorTpl< colChanI64, 4 > mjr::color4c64b
 colorTpl: 4 Channel @ 64-bit unsigned int 256 – 192-bit RGBA
 
typedef colorTpl< colChanI64, 8 > mjr::color8c64b
 colorTpl: 8 Channel @ 64-bit unsigned int 512
 
typedef colorTpl< colChanF32, 1 > mjr::color1c32F
 colorTpl: 1 Channel @ 32-bit floating point 32 – 32-bit Floating Greyscale

 
typedef colorTpl< colChanF32, 2 > mjr::color2c32F
 colorTpl: 2 Channel @ 32-bit floating point 64

 
typedef colorTpl< colChanF32, 3 > mjr::color3c32F
 colorTpl: 3 Channel @ 32-bit floating point 96 – 96-bit Floating RGB
 
typedef colorTpl< colChanF32, 4 > mjr::color4c32F
 colorTpl: 4 Channel @ 32-bit floating point 128 – 96-bit Floating RGBA
 
typedef colorTpl< colChanF32, 8 > mjr::color8c32F
 colorTpl: 8 Channel @ 32-bit floating point 256
 
typedef colorTpl< colChanF32, 16 > mjr::color16c32F
 colorTpl: 16 Channel @ 32-bit floating point 512
 
typedef colorTpl< colChanF64, 1 > mjr::color1c64F
 colorTpl: 1 Channel @ 64-bit floating point 64 – 64-bit Floating Greyscale
 
typedef colorTpl< colChanF64, 2 > mjr::color2c64F
 colorTpl: 2 Channel @ 64-bit floating point 128

 
typedef colorTpl< colChanF64, 3 > mjr::color3c64F
 colorTpl: 3 Channel @ 64-bit floating point 192 – 192-bit Floating RGB
 
typedef colorTpl< colChanF64, 4 > mjr::color4c64F
 colorTpl: 4 Channel @ 64-bit floating point 256 – 256-bit Floating RGBA
 
typedef colorTpl< colChanF64, 8 > mjr::color8c64F
 colorTpl: 8 Channel @ 64-bit floating point 512
 

Complete Color Types with Traditional Names

Many people prefere to use tranditional, RGB/greyscale names for color types.

typedef color4c8b mjr::colorRGBA8b
 colorTpl: RGBA (8-bit int/channel) (truecolor)
 
typedef color4c16b mjr::colorRGBA16b
 colorTpl: RGBA (16-bit int/channel)
 
typedef color4c32b mjr::colorRGBA32b
 colorTpl: RGBA (32-bit int/channel)
 
typedef color4c64b mjr::colorRGBA64b
 colorTpl: RGBA (64-bit int/channel)
 
typedef color4c32F mjr::colorRGBA32F
 colorTpl: RGBA (32-bit float/channel)
 
typedef color4c64F mjr::colorRGBA64F
 colorTpl: RGBA (64-bit float/channel)
 
typedef color3c8b mjr::colorRGB8b
 colorTpl: RGB (8-bit int/channel) (truecolor)
 
typedef color3c16b mjr::colorRGB16b
 colorTpl: RGB (16-bit int/channel)
 
typedef color3c32b mjr::colorRGB32b
 colorTpl: RGB (32-bit int/channel)
 
typedef color3c64b mjr::colorRGB64b
 colorTpl: RGB (64-bit int/channel)
 
typedef color3c32F mjr::colorRGB32F
 colorTpl: RGB (32-bit float/channel)
 
typedef color3c64F mjr::colorRGB64F
 colorTpl: RGB (64-bit float/channel)
 
typedef color1c8b mjr::colorGrey8b
 colorTpl: 8-bit int Greyscale
 
typedef color1c16b mjr::colorGrey16b
 colorTpl: 16-bit int Greyscale
 
typedef color1c32b mjr::colorGrey32b
 colorTpl: 32-bit int Greyscale
 
typedef color1c64b mjr::colorGrey64b
 colorTpl: 64-bit int Greyscale
 
typedef color1c32F mjr::colorGrey32F
 colorTpl: 32-bit float Greyscale
 
typedef color1c64F mjr::colorGrey64F
 colorTpl: 64-bit float Greyscale
 

Complete Color Types with 8-bit channels and commonly used orderings for R, G, B, & A

These are commonly used by libraries like Cairo, Open GL, SDL, etc...

typedef colorTpl< colChanI8, 3, 2, 1, 0 > mjr::colorBGR8b
 colorTpl: 3 Channel @ 8-bit unsigned int 24
 
typedef colorTpl< colChanI8, 4, 1, 2, 3, 0 > mjr::colorARGB8b
 colorTpl: 4 Channel @ 8-bit unsigned int 32
 
typedef colorTpl< colChanI8, 4, 2, 1, 0, 3 > mjr::colorBGRA8b
 colorTpl: 4 Channel @ 8-bit unsigned int 32
 
typedef colorTpl< colChanI8, 4, 3, 2, 1, 0 > mjr::colorABGR8b
 colorTpl: 4 Channel @ 8-bit unsigned int 32
 

Detailed Description

User include file for color types.

Author
Mitch Richling https://www.mitchr.me

Definition in file MRcolor.hpp.

Macro Definition Documentation

◆ MJR_INCLUDE_MRcolor

#define MJR_INCLUDE_MRcolor

Definition at line 159 of file MRcolor.hpp.