Created
May 16, 2024 05:22
-
-
Save JimBobSquarePants/4dfff5f80af32da980016f38076c88f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using SixLabors.ImageSharp; | |
using SixLabors.ImageSharp.Processing; | |
using SixLabors.ImageSharp.Processing.Processors.Quantization; | |
void Main() | |
{ | |
using Image image = Image.Load(@"C:\Users\james\Downloads\fish.png"); | |
image.Mutate(x => x.Quantize(new WuQuantizer(new() { MaxColors = 7 }))); | |
image.Save(@"C:\Users\james\Downloads\fish-7-colors.png"); | |
} |
Author
JimBobSquarePants
commented
May 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment