From 8568de28ed04fc063ddd485d6684740dc198f743 Mon Sep 17 00:00:00 2001 From: AUnicornWithNoLife Date: Tue, 10 Jan 2023 09:43:52 +0000 Subject: [PATCH] out bitmpa --- Program.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Program.cs b/Program.cs index 6aa72a1..bdb2d5f 100644 --- a/Program.cs +++ b/Program.cs @@ -271,6 +271,21 @@ namespace Cupola this.pixels[x, y] = color; } + public Bitmap ToBitmap() + { + Bitmap output = new Bitmap((int)this.width, (int)this.height); + + for (int x = 0; x < width; x++) + { + for (int y = 0; y < height; y++) + { + output.SetPixel(x, y, pixels[x, y].Export()); + } + } + + return output; + } + public static void Spread(FloatImage[] images, ref float minus, ref float multiply) { FloatColor[] colors = new FloatColor[images[0].width * images[0].height * images.Length];