xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
pixel_format.h
Go to the documentation of this file.
1 #pragma once
5 #include <cstdint>
6 #include <ostream>
7 #include <string>
8 
10 namespace xtd {
12  namespace drawing {
15  namespace imaging {
25  enum class pixel_format {
27  undefined = 0,
29  dont_care = 0,
31  max = 0x0000000F,
33  indexed = 0x00010000,
35  gdi = 0x00020000,
37  format16bpp_rgb555 = 0x00021005,
39  format16bpp_rgb565 = 0x00021006,
41  format24bpp_rgb = 0x00021808,
43  format32bpp_rgb = 0x00022009,
45  format1bpp_indexed = 0x00030101,
47  format4bpp_indexed = 0x00030402,
49  format8bpp_indexed = 0x00030803,
51  alpha = 0x00040000,
53  format16bpp_argb1555 = 0x00061007,
55  palpha = 0x00080000,
57  format32bpp_pargb = 0x000E200B,
59  extended = 0x00100000,
61  format16bpp_gray_scale = 0x00101004,
63  format48bpp_rgb = 0x0010300C,
65  format64bpp_pargb = 0x001C400E,
67  canonical = 0x00200000,
69  format32bpp_argb = 0x0026200A,
71  format64bpp_argb = 0x0034400D,
72  };
73 
75  inline std::ostream& operator<<(std::ostream& os, pixel_format value) {return os << xtd::to_string(value, {{pixel_format::undefined, "undefined"}, {pixel_format::max, "max"}, {pixel_format::indexed, "indexed"}, {pixel_format::gdi, "gdi"}, {pixel_format::format16bpp_rgb555, "format16bpp_rgb555"}, {pixel_format::format16bpp_rgb565, "format16bpp_rgb565"}, {pixel_format::format24bpp_rgb, "format24bpp_rgb"}, {pixel_format::format32bpp_rgb, "format32bpp_rgb"}, {pixel_format::format1bpp_indexed, "format1bpp_indexed"}, {pixel_format::format4bpp_indexed, "format4bpp_indexed"}, {pixel_format::format8bpp_indexed, "format8bpp_indexed"}, {pixel_format::alpha, "alpha"}, {pixel_format::format16bpp_argb1555, "format16bpp_argb1555"}, {pixel_format::palpha, "palpha"}, {pixel_format::format32bpp_pargb, "format32bpp_pargb"}, {pixel_format::extended, "extended"}, {pixel_format::format16bpp_gray_scale, "format16bpp_gray_scale"}, {pixel_format::format48bpp_rgb, "format48bpp_rgb"}, {pixel_format::format64bpp_pargb, "format64bpp_pargb"}, {pixel_format::canonical, "canonical"}, {pixel_format::format32bpp_argb, "format32bpp_argb"}, {pixel_format::format64bpp_argb, "format64bpp_argb"}});}
76  inline std::wostream& operator<<(std::wostream& os, pixel_format value) {return os << xtd::to_string(value, {{pixel_format::undefined, L"undefined"}, {pixel_format::max, L"max"}, {pixel_format::indexed, L"indexed"}, {pixel_format::gdi, L"gdi"}, {pixel_format::format16bpp_rgb555, L"format16bpp_rgb555"}, {pixel_format::format16bpp_rgb565, L"format16bpp_rgb565"}, {pixel_format::format24bpp_rgb, L"format24bpp_rgb"}, {pixel_format::format32bpp_rgb, L"format32bpp_rgb"}, {pixel_format::format1bpp_indexed, L"format1bpp_indexed"}, {pixel_format::format4bpp_indexed, L"format4bpp_indexed"}, {pixel_format::format8bpp_indexed, L"format8bpp_indexed"}, {pixel_format::alpha, L"alpha"}, {pixel_format::format16bpp_argb1555, L"format16bpp_argb1555"}, {pixel_format::palpha, L"palpha"}, {pixel_format::format32bpp_pargb, L"format32bpp_pargb"}, {pixel_format::extended, L"extended"}, {pixel_format::format16bpp_gray_scale, L"format16bpp_gray_scale"}, {pixel_format::format48bpp_rgb, L"format48bpp_rgb"}, {pixel_format::format64bpp_pargb, L"format64bpp_pargb"}, {pixel_format::canonical, L"canonical"}, {pixel_format::format32bpp_argb, L"format32bpp_argb"}, {pixel_format::format64bpp_argb, L"format64bpp_argb"}});}
78  }
79  }
80 }
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: to_string.h:37
pixel_format
Specifies the format of the color data for each pixel in the image.
Definition: pixel_format.h:25
@ format16bpp_rgb555
Specifies that the format is 16 bits per pixel; 5 bits each are used for the red, green,...
@ format32bpp_pargb
Specifies that the format is 32 bits per pixel; 8 bits each are used for the alpha,...
@ alpha
The pixel data contains alpha values that are not premultiplied.
@ max
The maximum value for this enumeration.
@ format8bpp_indexed
Specifies that the format is 8 bits per pixel, indexed. The color table therefore has 256 colors in i...
@ undefined
The pixel format is undefined.
@ format64bpp_argb
Specifies that the format is 64 bits per pixel; 16 bits each are used for the alpha,...
@ gdi
The pixel data contains GDI colors.
@ indexed
The pixel data contains color-indexed values, which means the values are an index to colors in the sy...
@ format64bpp_pargb
Specifies that the format is 64 bits per pixel; 16 bits each are used for the alpha,...
@ palpha
The pixel format contains premultiplied alpha values.
@ canonical
The default pixel format of 32 bits per pixel. The format specifies 24-bit color depth and an 8-bit a...
@ format32bpp_rgb
Specifies that the format is 32 bits per pixel; 8 bits each are used for the red, green,...
@ format4bpp_indexed
Specifies that the format is 4 bits per pixel, indexed.
@ format32bpp_argb
Specifies that the format is 32 bits per pixel; 8 bits each are used for the alpha,...
@ format16bpp_rgb565
Specifies that the format is 16 bits per pixel; 5 bits are used for the red component,...
@ dont_care
No pixel format is specified.
@ format16bpp_argb1555
The pixel format is 16 bits per pixel. The color information specifies 32,768 shades of color,...
@ format24bpp_rgb
Specifies that the format is 24 bits per pixel; 8 bits each are used for the red, green,...
@ format16bpp_gray_scale
The pixel format is 16 bits per pixel. The color information specifies 65536 shades of gray.
@ format1bpp_indexed
Specifies that the pixel format is 1 bit per pixel and that it uses indexed color....
@ format48bpp_rgb
Specifies that the format is 48 bits per pixel; 16 bits each are used for the red,...
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17