Divooka.Multimedia.Image

Divooka.Multimedia.Image.Color

Parcel-native standard color representation, used mostly by dependent packages (aka. not directly in Parcel.Image) TODO: Move this type to CoreEngine.

Remarks

Can we merge this with PixeL? Pixel is more performant.

Divooka.Multimedia.Image.Color.Alpha

Opacity (Transparency), higher value means more opaque.

Divooka.Multimedia.Image.Color.Parse()

Parses a string representation of a color and returns the corresponding Divooka.Multimedia.Image.Color instance.

Parameters

NameDescriptionDefault
textColor A string representing the color. This can either be a hexadecimal value (starting with '#') in the format "#RRGGBB" or "#RRGGBBAA" (with an optional alpha component) or the name of a predefined color in Divooka.Multimedia.Image.Colors.

Returns

A Divooka.Multimedia.Image.Color instance that corresponds to the specified text representation.

Divooka.Multimedia.Image.Color.ParseHexRGBA()

Parses a hexadecimal string representation of a color in RGBA order.

Parameters

NameDescriptionDefault
hex A hexadecimal string representing the color. The string may optionally start with '#' and must be in the format "RRGGBB" or "RRGGBBAA", where the alpha component is optional and defaults to 255 if omitted.

Returns

A Divooka.Multimedia.Image.Color instance created from the parsed RGBA values.

Divooka.Multimedia.Image.Color.ParseHexARGB()

Parses a hexadecimal string representation of a color in ARGB order.

Parameters

NameDescriptionDefault
hex A hexadecimal string representing the color. The string may optionally start with '#' and must be in the format "AARRGGBB", where the alpha component comes first.

Returns

A Divooka.Multimedia.Image.Color instance created from the parsed ARGB values.

Divooka.Multimedia.Image.Color.ToString

Returns a hexadecimal string representation of the Divooka.Multimedia.Image.Color.

Returns

A string in the format "#RRGGBBAA" representing the red, green, blue, and alpha components of the color.

Divooka.Multimedia.Image.Color.FromConsoleColor()

Converts a ConsoleColor to a Color instance using a fixed mapping.

Divooka.Multimedia.Image.Color.ToConsoleColor

Converts this Color instance to the closest matching ConsoleColor. The match is determined by the Euclidean distance between RGB components.

Divooka.Multimedia.Image.Color.ToHex()

Convert color to RGB hex representation.

Returns

Hex representation in the format of #RRBBGG

Divooka.Multimedia.Image.Pixel

Remarks

The sequential layout becomes important when concerns performance between interoperation between SkiaSharp and Magick.

Divooka.Multimedia.Image.Pixel.Alpha

Opacity (Transparency), higher value means more opaque.

Divooka.Multimedia.Image.PixelImage

Row-major 2D image pixel grid.

Divooka.Multimedia.Image.PixelImage.Pixels

Remarks

Row-major, aka. Pixels[Row][Col] or Pixels[Height][Width]

Divooka.Multimedia.Image.PixelImage.FileReference

Use this to save having to load the file into memory.

Divooka.Multimedia.Image.PixelImage.ShouldLoadFileDirectly

Should load file from disk instead of relying on in-memory data

Divooka.Multimedia.Image.PixelImage.#ctor()

Initialize image with some color

Divooka.Multimedia.Image.PixelImage.GetPngBuffer

Serialize image as raw png buffer