PeterO.Png4BitIndexed
## PeterO.Png4BitIndexed
public sealed class Png4BitIndexed
A simple class for encoding PNG image files.
Member Summary
[GetColor(int)](#GetColor_int)- Not documented yet.[GetPixel(int, int)](#GetPixel_int_int)- Not documented yet.[Height](#Height)- Gets the height of the image.[Save(string)](#Save_string)- Not documented yet.[SetColor(int, byte[])](#SetColor_int_byte)- Not documented yet.[SetPixel(int, int, int)](#SetPixel_int_int_int)- Not documented yet.[Transparent](#Transparent)- Gets or sets the index of the transparent color.[Width](#Width)- Gets the width of the image.
### Png4BitIndexed Constructor
public Png4BitIndexed(
int width,
int height);
Initializes a new instance of the PeterO.Png4BitIndexed class.
Parameters:
-
width: The parameter width is a 32-bit signed integer.
-
height: The parameter height is a 32-bit signed integer.
public int Height { get; }
Gets the height of the image.
Returns:
The height of the image.
public int Transparent { get; set; }
Gets or sets the index of the transparent color.
Returns:
The index of the transparent color.
public int Width { get; }
Gets the width of the image.
Returns:
The width of the image.
public byte[] GetColor(
int index);
Not documented yet.
Parameters:
- index: The parameter index is a 32-bit signed integer.
Return Value:
A byte array.
public int GetPixel(
int x,
int y);
Not documented yet.
Parameters:
-
x: The parameter x is a 32-bit signed integer.
-
y: The parameter y is a 32-bit signed integer.
Return Value:
A 32-bit signed integer.
public void Save(
string filename);
Not documented yet.
Parameters:
- filename: The parameter filename is a text string.
Exceptions:
- System.ArgumentNullException: The parameter filename is null.
public void SetColor(
int index,
byte[] color);
Not documented yet.
Parameters:
-
index: The parameter index is a 32-bit signed integer.
-
color: The parameter color is a.Byte[] object.
Exceptions:
-
System.ArgumentNullException: The parameter color is null.
-
System.ArgumentException: The parameter color must have length 3 or more.
public void SetPixel(
int x,
int y,
int pixel);
Not documented yet.
Parameters:
-
x: The parameter x is a 32-bit signed integer.
-
y: The parameter y is a 32-bit signed integer.
-
pixel: The parameter pixel is a 32-bit signed integer.