SynthetizePalette() public method

public SynthetizePalette ( IColorQuantizer quantizer, Int32 colorCount, Int32 parallelTaskCount = 4 ) : List
quantizer IColorQuantizer
colorCount System.Int32
parallelTaskCount System.Int32
return List
Esempio n. 1
0
        public static List <Color> SynthetizeImagePalette(Image sourceImage, IColorQuantizer quantizer, Int32 colorCount, Int32 parallelTaskCount = 4)
        {
            // checks parameters
            Guard.CheckNull(sourceImage, "sourceImage");

            // wraps source image to a buffer
            using (ImageBuffer source = new ImageBuffer(sourceImage, ImageLockMode.ReadOnly))
            {
                return(source.SynthetizePalette(quantizer, colorCount, parallelTaskCount));
            }
        }
Esempio n. 2
0
        public static List<Color> SynthetizeImagePalette(Image sourceImage, IColorQuantizer quantizer, Int32 colorCount, Int32 parallelTaskCount = 4)
        {
            // checks parameters
            Guard.CheckNull(sourceImage, "sourceImage");

            // wraps source image to a buffer
            using (ImageBuffer source = new ImageBuffer(sourceImage, ImageLockMode.ReadOnly))
            {
                return source.SynthetizePalette(quantizer, colorCount, parallelTaskCount);
            }
        }