public static ChangeFormat ( Image sourceImage, PixelFormat targetFormat, IColorQuantizer quantizer, Image &targetImage, |
||
sourceImage | Image | |
targetFormat | PixelFormat | |
quantizer | IColorQuantizer | |
targetImage | Image | |
parallelTaskCount | ||
Результат | void |
public static void ChangeFormat(ImageBuffer source, PixelFormat targetFormat, IColorQuantizer quantizer, out Image targetImage, Int32 parallelTaskCount = 4) { // checks parameters Guard.CheckNull(source, "source"); // creates a target bitmap in an appropriate format targetImage = new Bitmap(source.Width, source.Height, targetFormat); // wraps target image to a buffer using (ImageBuffer target = new ImageBuffer(targetImage, ImageLockMode.WriteOnly)) { source.ChangeFormat(target, quantizer, parallelTaskCount); } }
public static void ChangeFormat(ImageBuffer source, PixelFormat targetFormat, IColorQuantizer quantizer, out Image targetImage, Int32 parallelTaskCount = 4) { // checks parameters Guard.CheckNull(source, "source"); // creates a target bitmap in an appropriate format targetImage = new Bitmap(source.Width, source.Height, targetFormat); // wraps target image to a buffer using (ImageBuffer target = new ImageBuffer(targetImage, ImageLockMode.WriteOnly)) { source.ChangeFormat(target, quantizer, parallelTaskCount); } }