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.
image_flags.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 {
22  enum class image_flags {
24  none = 0,
26  scalable = 0b1,
28  has_alpha = 0b10,
30  has_translucent = 0b100,
32  partially_scalable = 0b1000,
34  color_space_rgb = 0b10000,
36  color_space_cmyk = 0b100000,
38  color_space_gray = 0b1000000,
40  color_space_ycbcr = 0b10000000,
42  color_space_ycck = 0b100000000,
44  has_real_dpi = 0b1000000000000,
46  has_real_pixel_size = 0b10000000000000,
48  read_only = 0b10000000000000000,
50  caching = 0b100000000000000000,
51  };
52 
54  inline std::ostream& operator<<(std::ostream& os, image_flags value) {return os << xtd::to_string(value, {{image_flags::none, "none"}, {image_flags::scalable, "scalable"}, {image_flags::has_alpha, "has_alpha"}, {image_flags::has_translucent, "has_translucent"}, {image_flags::partially_scalable, "partially_scalable"}, {image_flags::color_space_rgb, "color_space_rgb"}, {image_flags::color_space_cmyk, "color_space_cmyk"}, {image_flags::color_space_gray, "color_space_gray"}, {image_flags::color_space_ycbcr, "color_space_ycbcr"}, {image_flags::color_space_ycck, "color_space_ycck"}, {image_flags::has_real_dpi, "has_real_dpi"}, {image_flags::has_real_pixel_size, "has_real_pixel_size"}, {image_flags::read_only, "read_only"}, {image_flags::caching, "caching"}});}
55  inline std::wostream& operator<<(std::wostream& os, image_flags value) {return os << xtd::to_string(value, {{image_flags::none, L"none"}, {image_flags::scalable, L"scalable"}, {image_flags::has_alpha, L"has_alpha"}, {image_flags::has_translucent, L"has_translucent"}, {image_flags::partially_scalable, L"partially_scalable"}, {image_flags::color_space_rgb, L"color_space_rgb"}, {image_flags::color_space_cmyk, L"color_space_cmyk"}, {image_flags::color_space_gray, L"color_space_gray"}, {image_flags::color_space_ycbcr, L"color_space_ycbcr"}, {image_flags::color_space_ycck, L"color_space_ycck"}, {image_flags::has_real_dpi, L"has_real_dpi"}, {image_flags::has_real_pixel_size, L"has_real_pixel_size"}, {image_flags::read_only, L"read_only"}, {image_flags::caching, L"caching"}});}
57  }
58  }
59 }
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
image_flags
Specifies the attributes of the pixel data contained in an xtd::drawing::image object....
Definition: image_flags.h:22
@ has_alpha
The pixel data contains alpha information.
@ none
There is no format information.
@ color_space_gray
The pixel data is grayscale.
@ caching
The pixel data can be cached for faster access.
@ color_space_rgb
The pixel data uses an RGB color space.
@ color_space_ycck
Specifies that the image is stored using a YCCK color space.
@ partially_scalable
The pixel data is partially scalable, but there are some limitations.
@ scalable
The pixel data is scalable.
@ read_only
The pixel data is read-only.
@ has_translucent
Specifies that the pixel data has alpha values other than 0 (transparent) and 255 (opaque).
@ color_space_cmyk
The pixel data uses a CMYK color space.
@ color_space_ycbcr
Specifies that the image is stored using a YCBCR color space.
@ has_real_dpi
Specifies that dots per inch information is stored in the image.
@ has_real_pixel_size
Specifies that the pixel size is stored in the image.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17