The purpose of this repository is to provide a way for people to create placeholder images quickly. https://www.craigoates.net/Software/project/11
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.4 KiB

#load "ImageMaker.fs"
open System.Drawing
open System.Drawing.Imaging
open SmoulderingBeachBall
open SmoulderingBeachBall.ImageMaker
// 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
let borderOverlay =
{ colour = Brushes.BlueViolet;
overlayType = Border }
let fullOverlay =
{ colour = Brushes.Fuchsia;
overlayType = Full }
let imageSpec =
{ width = 500;
height = 500;
colour = Brushes.Yellow;
filePath = im_testPath;
overlay = borderOverlay } // Change this to quickly change between a border overlay and a full overlay.
makeImage2 imageSpec |> Async.RunSynchronously