Craig Oates
6 years ago
2 changed files with 31 additions and 0 deletions
@ -0,0 +1,28 @@
|
||||
#load "ImageMaker.fs" |
||||
|
||||
open System.Drawing |
||||
open System.Drawing.Imaging |
||||
open SmoulderingBeachBall |
||||
|
||||
// INITIAL IDEA ======================================================================================================= |
||||
|
||||
let width = 500 |
||||
let height = 500 |
||||
let colour = Brushes.BurlyWood |
||||
let testPath = "C:/users/craig/desktop/test.png" |
||||
let draw () = |
||||
use bmp = new Bitmap(width, height) |
||||
use gr = Graphics.FromImage(bmp) |
||||
gr.FillRectangle(colour, new Rectangle(0, 0, bmp.Width, bmp.Height)) |
||||
gr.DrawImage(bmp, 0, 0) |
||||
bmp.Save(testPath, ImageFormat.Png) |
||||
|
||||
// IMAGE MAKER ======================================================================================================== |
||||
|
||||
let im_width = 500 |
||||
let im_height = 500 |
||||
let im_colour = Brushes.BurlyWood |
||||
let im_testPath = "C:/users/craig/desktop/test.png" |
||||
|
||||
ImageMaker.makeImage im_width im_height im_colour im_testPath |
||||
|> Async.RunSynchronously |
Loading…
Reference in new issue