C# Class hqx.HqxSharp

Mostra file Open project: michaelrbk/pixelart-vectorizer

Public Methods

Method Description
Scale2 ( Bitmap bitmap, uint trY = 48, uint trU = 7, uint trV = 6, uint trA, bool wrapX = false, bool wrapY = false ) : Bitmap

This is the extended C# port of the hq2x algorithm.

The image is scaled to twice its size.

Scale2 ( uint sp, uint dp, int Xres, int Yres, uint trY = 48, uint trU = 7, uint trV = 6, uint trA, bool wrapX = false, bool wrapY = false ) : void

This is the extended C# port of the hq2x algorithm.

The destination image must be exactly twice as large in both dimensions as the source image.

Scale3 ( Bitmap bitmap, uint trY = 48, uint trU = 7, uint trV = 6, uint trA, bool wrapX = false, bool wrapY = false ) : Bitmap

This is the extended C# port of the hq3x algorithm.

The image is scaled to three times its size.

Scale3 ( uint sp, uint dp, int Xres, int Yres, uint trY = 48, uint trU = 7, uint trV = 6, uint trA, bool wrapX = false, bool wrapY = false ) : void

This is the extended C# port of the hq3x algorithm.

The destination image must be exactly three times as large in both dimensions as the source image.

Scale4 ( Bitmap bitmap, uint trY = 48, uint trU = 7, uint trV = 6, uint trA, bool wrapX = false, bool wrapY = false ) : Bitmap

This is the extended C# port of the hq4x algorithm.

The image is scaled to four times its size.

Scale4 ( uint sp, uint dp, int Xres, int Yres, uint trY = 48, uint trU = 7, uint trV = 6, uint trA, bool wrapX = false, bool wrapY = false ) : void

This is the extended C# port of the hq4x algorithm.

The destination image must be exactly four times as large in both dimensions as the source image.

Private Methods

Method Description
Diff ( uint c1, uint c2, uint trY, uint trU, uint trV, uint trA ) : bool

Compares two ARGB colors according to the provided Y, U, V and A thresholds.

Method Details

Scale2() public static method

This is the extended C# port of the hq2x algorithm.

The image is scaled to twice its size.

public static Scale2 ( Bitmap bitmap, uint trY = 48, uint trU = 7, uint trV = 6, uint trA, bool wrapX = false, bool wrapY = false ) : Bitmap
bitmap Bitmap The source image.
trY uint The Y (luminance) threshold.
trU uint The U (chrominance) threshold.
trV uint The V (chrominance) threshold.
trA uint The A (transparency) threshold.
wrapX bool Used for images that can be seamlessly repeated horizontally.
wrapY bool Used for images that can be seamlessly repeated vertically.
return Bitmap

Scale2() public static method

This is the extended C# port of the hq2x algorithm.

The destination image must be exactly twice as large in both dimensions as the source image.

public static Scale2 ( uint sp, uint dp, int Xres, int Yres, uint trY = 48, uint trU = 7, uint trV = 6, uint trA, bool wrapX = false, bool wrapY = false ) : void
sp uint A pointer to the source image.
dp uint A pointer to the destination image.
Xres int The horizontal resolution of the source image.
Yres int The vertical resolution of the source image.
trY uint The Y (luminance) threshold.
trU uint The U (chrominance) threshold.
trV uint The V (chrominance) threshold.
trA uint The A (transparency) threshold.
wrapX bool Used for images that can be seamlessly repeated horizontally.
wrapY bool Used for images that can be seamlessly repeated vertically.
return void

Scale3() public static method

This is the extended C# port of the hq3x algorithm.

The image is scaled to three times its size.

public static Scale3 ( Bitmap bitmap, uint trY = 48, uint trU = 7, uint trV = 6, uint trA, bool wrapX = false, bool wrapY = false ) : Bitmap
bitmap Bitmap The source image.
trY uint The Y (luminance) threshold.
trU uint The U (chrominance) threshold.
trV uint The V (chrominance) threshold.
trA uint The A (transparency) threshold.
wrapX bool Used for images that can be seamlessly repeated horizontally.
wrapY bool Used for images that can be seamlessly repeated vertically.
return Bitmap

Scale3() public static method

This is the extended C# port of the hq3x algorithm.

The destination image must be exactly three times as large in both dimensions as the source image.

public static Scale3 ( uint sp, uint dp, int Xres, int Yres, uint trY = 48, uint trU = 7, uint trV = 6, uint trA, bool wrapX = false, bool wrapY = false ) : void
sp uint A pointer to the source image.
dp uint A pointer to the destination image.
Xres int The horizontal resolution of the source image.
Yres int The vertical resolution of the source image.
trY uint The Y (luminance) threshold.
trU uint The U (chrominance) threshold.
trV uint The V (chrominance) threshold.
trA uint The A (transparency) threshold.
wrapX bool Used for images that can be seamlessly repeated horizontally.
wrapY bool Used for images that can be seamlessly repeated vertically.
return void

Scale4() public static method

This is the extended C# port of the hq4x algorithm.

The image is scaled to four times its size.

public static Scale4 ( Bitmap bitmap, uint trY = 48, uint trU = 7, uint trV = 6, uint trA, bool wrapX = false, bool wrapY = false ) : Bitmap
bitmap Bitmap The source image.
trY uint The Y (luminance) threshold.
trU uint The U (chrominance) threshold.
trV uint The V (chrominance) threshold.
trA uint The A (transparency) threshold.
wrapX bool Used for images that can be seamlessly repeated horizontally.
wrapY bool Used for images that can be seamlessly repeated vertically.
return Bitmap

Scale4() public static method

This is the extended C# port of the hq4x algorithm.

The destination image must be exactly four times as large in both dimensions as the source image.

public static Scale4 ( uint sp, uint dp, int Xres, int Yres, uint trY = 48, uint trU = 7, uint trV = 6, uint trA, bool wrapX = false, bool wrapY = false ) : void
sp uint A pointer to the source image.
dp uint A pointer to the destination image.
Xres int The horizontal resolution of the source image.
Yres int The vertical resolution of the source image.
trY uint The Y (luminance) threshold.
trU uint The U (chrominance) threshold.
trV uint The V (chrominance) threshold.
trA uint The A (transparency) threshold.
wrapX bool Used for images that can be seamlessly repeated horizontally.
wrapY bool Used for images that can be seamlessly repeated vertically.
return void