xtd.drawing - Reference Guide  0.1.0
Modern c++17 library providing access to GDI+ basic graphics functionality. More advanced functionality is provided in the drawing 2D, imaging, and text.
xtd::drawing::imaging Namespace Reference

The xtd.drawing.imaging namespace provides advanced GDI+ imaging functionality. More...

Classes

class  color_palette
 Defines an array of colors that make up a color palette. More...
 
class  frame_dimension
 Provides properties that get the frame dimensions of an image. More...
 
class  image_format
 Specifies the file format of the image. More...
 
class  property_item
 Encapsulates a metadata property to be included in an image file. More...
 

Enumerations

enum  image_flags {
  image_flags::none = 0, image_flags::scalable = 0b1, image_flags::has_alpha = 0b10, image_flags::has_translucent = 0b100,
  image_flags::partially_scalable = 0b1000, image_flags::color_space_rgb = 0b10000, image_flags::color_space_cmyk = 0b100000, image_flags::color_space_gray = 0b1000000,
  image_flags::color_space_ycbcr = 0b10000000, image_flags::color_space_ycck = 0b100000000, image_flags::has_real_dpi = 0b1000000000000, image_flags::has_real_pixel_size = 0b10000000000000,
  image_flags::read_only = 0b10000000000000000, image_flags::caching = 0b100000000000000000
}
 Specifies the attributes of the pixel data contained in an System::Drawing::Image object. More...
 
enum  pixel_format {
  pixel_format::undefined = 0, pixel_format::dont_care = 0, pixel_format::max = 0x0000000F, pixel_format::indexed = 0x00010000,
  pixel_format::gdi = 0x00020000, pixel_format::format16bpp_rgb555 = 0x00021005, pixel_format::format16bpp_rgb565 = 0x00021006, pixel_format::format24bpp_rgb = 0x00021808,
  pixel_format::format32bpp_rgb = 0x00022009, pixel_format::format1bpp_indexed = 0x00030101, pixel_format::format4bpp_indexed = 0x00030402, pixel_format::format8bpp_indexed = 0x00030803,
  pixel_format::alpha = 0x00040000, pixel_format::format16bpp_argb1555 = 0x00061007, pixel_format::palpha = 0x00080000, pixel_format::format32bpp_pargb = 0x000E200B,
  pixel_format::extended = 0x00100000, pixel_format::format16bpp_gray_scale = 0x00101004, pixel_format::format48bpp_rgb = 0x0010300C, pixel_format::format64bpp_pargb = 0x001C400E,
  pixel_format::canonical = 0x00200000, pixel_format::format32bpp_argb = 0x0026200A, pixel_format::format64bpp_argb = 0x0034400D
}
 Specifies the format of the color data for each pixel in the image. More...
 

Detailed Description

The xtd.drawing.imaging namespace provides advanced GDI+ imaging functionality.

Basic graphics functionality is provided by the xtd.drawing namespace.

Remarks
The metafile class provides methods for recording and saving metafiles. The encoder class enables users to extend GDI+ to support any image format. The property_item class provides methods for storing and retrieving metadata in image files.

Enumeration Type Documentation

§ image_flags

Specifies the attributes of the pixel data contained in an System::Drawing::Image object.

The xtd::drawing:iImage::flags property returns a member of this enumeration.

Library
xtd.drawing
Enumerator
none 

There is no format information.

scalable 

The pixel data is scalable.

has_alpha 

The pixel data contains alpha information.

has_translucent 

Specifies that the pixel data has alpha values other than 0 (transparent) and 255 (opaque).

partially_scalable 

The pixel data is partially scalable, but there are some limitations.

color_space_rgb 

The pixel data uses an RGB color space.

color_space_cmyk 

The pixel data uses a CMYK color space.

color_space_gray 

The pixel data is grayscale.

color_space_ycbcr 

Specifies that the image is stored using a YCBCR color space.

color_space_ycck 

Specifies that the image is stored using a YCCK 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.

read_only 

The pixel data is read-only.

caching 

The pixel data can be cached for faster access.

§ pixel_format

Specifies the format of the color data for each pixel in the image.

Library
xtd.drawing
Remarks
The pixel format defines the number of bits of memory associated with one pixel of data. The format also defines the order of the color components within a single pixel of data.
PixelFormat48bppRGB, PixelFormat64bppARGB, and PixelFormat64bppPARGB use 16 bits per color component (channel). GDI+ version 1.0 and 1.1 can read 16-bits-per-channel images, but such images are converted to an 8-bits-per-channel format for processing, displaying, and saving. Each 16-bit color channel can hold a value in the range 0 through 2^13.
Some of the pixel formats contain premultiplied color values. Premultiplied means that the color values have already been multiplied by an alpha value.
Enumerator
undefined 

The pixel format is undefined.

dont_care 

No pixel format is specified.

max 

The maximum value for this enumeration.

indexed 

The pixel data contains color-indexed values, which means the values are an index to colors in the system color table, as opposed to individual color values.

gdi 

The pixel data contains GDI colors.

format16bpp_rgb555 

Specifies that the format is 16 bits per pixel; 5 bits each are used for the red, green, and blue components. The remaining bit is not used.

format16bpp_rgb565 

Specifies that the format is 16 bits per pixel; 5 bits are used for the red component, 6 bits are used for the green component, and 5 bits are used for the blue component.

format24bpp_rgb 

Specifies that the format is 24 bits per pixel; 8 bits each are used for the red, green, and blue components.

format32bpp_rgb 

Specifies that the format is 32 bits per pixel; 8 bits each are used for the red, green, and blue components. The remaining 8 bits are not used.

format1bpp_indexed 

Specifies that the pixel format is 1 bit per pixel and that it uses indexed color. The color table therefore has two colors in it.

format4bpp_indexed 

Specifies that the format is 4 bits per pixel, indexed.

format8bpp_indexed 

Specifies that the format is 8 bits per pixel, indexed. The color table therefore has 256 colors in it.

alpha 

The pixel data contains alpha values that are not premultiplied.

format16bpp_argb1555 

The pixel format is 16 bits per pixel. The color information specifies 32,768 shades of color, of which 5 bits are red, 5 bits are green, 5 bits are blue, and 1 bit is alpha.

palpha 

The pixel format contains premultiplied alpha values.

format32bpp_pargb 

Specifies that the format is 32 bits per pixel; 8 bits each are used for the alpha, red, green, and blue components. The red, green, and blue components are premultiplied, according to the alpha component.

extended 

Reserved.

format16bpp_gray_scale 

The pixel format is 16 bits per pixel. The color information specifies 65536 shades of gray.

format48bpp_rgb 

Specifies that the format is 48 bits per pixel; 16 bits each are used for the red, green, and blue components.

format64bpp_pargb 

Specifies that the format is 64 bits per pixel; 16 bits each are used for the alpha, red, green, and blue components. The red, green, and blue components are premultiplied according to the alpha component.

canonical 

The default pixel format of 32 bits per pixel. The format specifies 24-bit color depth and an 8-bit alpha channel.

format32bpp_argb 

Specifies that the format is 32 bits per pixel; 8 bits each are used for the alpha, red, green, and blue components.

format64bpp_argb 

Specifies that the format is 64 bits per pixel; 16 bits each are used for the alpha, red, green, and blue components.