diff --git a/DeathSocket/ImageServices.fs b/DeathSocket/ImageServices.fs index 9b621fc..373b536 100644 --- a/DeathSocket/ImageServices.fs +++ b/DeathSocket/ImageServices.fs @@ -3,7 +3,6 @@ open System.Drawing open System.Drawing.Imaging open DeathSocket - open System.IO let createHorizontalLines width height rows = let interval = width / rows @@ -29,18 +28,4 @@ img.Save (spec.savePath, ImageFormat.Png) img.Dispose () graphics.Dispose () - pen.Dispose () - - let drawGridToStream (imgStream: Stream) spec = - let img = Bitmap.FromFile (spec.imagePath) - let graphics = Graphics.FromImage img - let pen = new Pen (spec.colour, width = spec.penWidth) - let horizontalLines = - createHorizontalLines (img.Size.Width) (img.Size.Height) (spec.columns) - let verticalLines = createVerticalLines (img.Size.Height) (spec.columns) - for line in horizontalLines do graphics.DrawLines (pen, line) - for line in verticalLines do graphics.DrawLines (pen, line) - graphics.Dispose () - pen.Dispose () - img.Save (imgStream, spec.format) - img.Dispose () \ No newline at end of file + pen.Dispose () \ No newline at end of file diff --git a/DeathSocket/ScratchPad.fsx b/DeathSocket/ScratchPad.fsx index fa5b9cd..a1741f9 100644 --- a/DeathSocket/ScratchPad.fsx +++ b/DeathSocket/ScratchPad.fsx @@ -8,6 +8,8 @@ open System open DeathSocket open Validation open ImageServices +open System.Drawing.Imaging +open System.IO // INITIAL IDEA =============================================================== diff --git a/DeathSocket/Validation.fs b/DeathSocket/Validation.fs index cf34e74..1931f22 100644 --- a/DeathSocket/Validation.fs +++ b/DeathSocket/Validation.fs @@ -5,5 +5,5 @@ open System.IO let validateFilePath path = match File.Exists path with | true -> () - | false -> raise (new FileNotFoundException (path + "could not be found.")) + | false -> raise (new FileNotFoundException (path + " could not be found."))