fix code formatting

main
cosmonaut 2023-03-15 11:47:44 -07:00
parent f10e8ec255
commit 6d0efda7e7
3 changed files with 119 additions and 117 deletions

View File

@ -2,10 +2,10 @@ namespace Palettizer2
{
public struct Color
{
public byte R { get; set; }
public byte G { get; set; }
public byte B { get; set; }
public byte A { get; set; }
public byte R;
public byte G;
public byte B;
public byte A;
public override string ToString()
{

View File

@ -9,8 +9,8 @@ namespace Palettizer2
public int GrayscaleCount { get; set; }
public List<byte[]> AlternateColorRows { get; }
public int Width { get => 256; }
public int Height { get => AlternateColorRows.Count + 1; }
public const int Width = 256;
public int Height => AlternateColorRows.Count + 1;
public Palette()
{
@ -35,7 +35,8 @@ namespace Palettizer2
break;
}
increment = ((increment > 0) ? (increment + 1) : (increment - 1)) * -1; // up by 1, down by 2, up by 3, etc
increment = ((increment > 0) ? (increment + 1) : (increment - 1)) *
-1; // up by 1, down by 2, up by 3, etc
}
}

View File

@ -21,7 +21,8 @@ namespace Palettizer2
)
};
var root = new RootCommand{
var root = new RootCommand
{
palettize
};
@ -74,7 +75,7 @@ namespace Palettizer2
{
writer.WritePng(
palette.CreateIndexedPaletteBitmap(),
palette.Width,
Palette.Width,
palette.Height,
StbImageWriteSharp.ColorComponents.RedGreenBlueAlpha,
stream);