Parse 12 vs 24 bit colors eventually
This commit is contained in:
+25
-4
@@ -5,9 +5,6 @@ namespace fxl.codes.kisekae.Models
|
||||
public class PaletteModel
|
||||
{
|
||||
private const string Regex = "%([a-zA-Z0-9\\-]*\\.[kKcCfF]+)[\\s]*;(.*)";
|
||||
|
||||
public string FileName { get; }
|
||||
public string Comment { get; }
|
||||
|
||||
public PaletteModel(string line)
|
||||
{
|
||||
@@ -17,7 +14,7 @@ namespace fxl.codes.kisekae.Models
|
||||
foreach (var group in matcher.GetGroupNames())
|
||||
{
|
||||
if (group == "0") continue;
|
||||
|
||||
|
||||
match.Groups.TryGetValue(group, out var value);
|
||||
if (string.IsNullOrEmpty(value?.Value)) continue;
|
||||
|
||||
@@ -32,5 +29,29 @@ namespace fxl.codes.kisekae.Models
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string FileName { get; }
|
||||
public string Comment { get; }
|
||||
|
||||
public Color[] Colors { get; private set; }
|
||||
|
||||
public void ParseColors(byte[] bytes, int depth)
|
||||
{
|
||||
Colors = new Color[0];
|
||||
}
|
||||
}
|
||||
|
||||
public class Color
|
||||
{
|
||||
public Color(int red, int green, int blue)
|
||||
{
|
||||
Red = red;
|
||||
Green = green;
|
||||
Blue = blue;
|
||||
}
|
||||
|
||||
public int Red { get; }
|
||||
public int Green { get; }
|
||||
public int Blue { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user