|
|
|
@ -17,7 +17,24 @@ namespace DeathSocket
|
|
|
|
|
open ImageServices |
|
|
|
|
open System |
|
|
|
|
|
|
|
|
|
// Not tested |
|
|
|
|
/// <summary> |
|
|
|
|
/// Uses the information included in spec to create a gridded image. |
|
|
|
|
/// It then asynchronously saves it. Uses .jpg or .png formats only. |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="spec"> |
|
|
|
|
/// The specification used to generate the new gridded image. The |
|
|
|
|
/// ImageSpec is a discriminated union, consisting of a Brush, RGBA, |
|
|
|
|
/// Skia or SkiaRGB spec. |
|
|
|
|
/// </param> |
|
|
|
|
/// <exeption cref="System.IO.FileNotFoundException"> |
|
|
|
|
/// If the file the grid is being applied to cannot be found, |
|
|
|
|
/// a FileNotFoundException will be thrown. |
|
|
|
|
/// </exception> |
|
|
|
|
/// <remarks |
|
|
|
|
/// Make sure the image, which is having the overlay added to it, |
|
|
|
|
/// is not in use or needed by another program/process. |
|
|
|
|
/// This is because it is locked whilst in this function. |
|
|
|
|
/// </remarks> |
|
|
|
|
let applyGridToImageAsync (spec: ImageSpec) = |
|
|
|
|
async { |
|
|
|
|
try |
|
|
|
|