TestPatternGenerator
Namespace: Hex1b.Automation
Assembly: Hex1b.dll
Generates well-known test pattern images for verifying graphics rendering. These patterns have predictable, easily verifiable outputs.
public static class TestPatternGeneratorInheritance
Object → TestPatternGenerator
Methods
ConvertToSixel(byte[], int, int)
Converts raw RGBA pixel data to a Sixel payload string.
Parameters:
pixels(Byte[]): RGBA pixel data (4 bytes per pixel).width(Int32): Image width in pixels.height(Int32): Image height in pixels.
Returns: String
Complete Sixel DCS sequence.
public static string ConvertToSixel(byte[] pixels, int width, int height)GenerateCheckerboard(int, int, int, (byte R, byte G, byte B)?, (byte R, byte G, byte B)?)
Generates a checkerboard pattern with specified colors.
Parameters:
width(Int32): Image width in pixels.height(Int32): Image height in pixels.squareSize(Int32): Size of each square in pixels.color1(Nullable<Byte, Byte, Byte>>): First color (default: black).color2(Nullable<Byte, Byte, Byte>>): Second color (default: white).
Returns: Byte[]
RGBA pixel data.
public static byte[] GenerateCheckerboard(int width, int height, int squareSize = 8, (byte R, byte G, byte B)? color1 = null, (byte R, byte G, byte B)? color2 = null)GenerateColorGrid(int, int)
Generates a 3x3 grid of primary and secondary colors. Layout: Red Green Blue Yellow Cyan Magenta Black Gray White
Parameters:
width(Int32): Image width in pixels (should be divisible by 3).height(Int32): Image height in pixels (should be divisible by 3).
Returns: Byte[]
RGBA pixel data.
public static byte[] GenerateColorGrid(int width, int height)GenerateGrayscaleGradient(int, int)
Generates a horizontal grayscale gradient from black (left) to white (right).
Parameters:
Returns: Byte[]
RGBA pixel data.
public static byte[] GenerateGrayscaleGradient(int width, int height)GenerateRegistrationMarks(int, int)
Generates a crosshair/registration mark pattern useful for alignment testing. White background with black crosshairs and corner markers.
Parameters:
Returns: Byte[]
RGBA pixel data.
public static byte[] GenerateRegistrationMarks(int width, int height)GenerateRgbGradients(int, int)
Generates RGB gradient bars (3 horizontal bands: R gradient, G gradient, B gradient).
Parameters:
width(Int32): Image width in pixels.height(Int32): Image height in pixels (should be divisible by 3).
Returns: Byte[]
RGBA pixel data.
public static byte[] GenerateRgbGradients(int width, int height)GenerateSmpteColorBars(int, int)
Generates SMPTE-style color bars (simplified 7-bar version). Colors from left to right: White, Yellow, Cyan, Green, Magenta, Red, Blue.
Parameters:
Returns: Byte[]
RGBA pixel data.
public static byte[] GenerateSmpteColorBars(int width, int height)