X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaUI%2FPiaZ.fs;h=18e9d6a4afaeae837d305c56ec993f1195faedab;hp=222095305e659bf2fc36ac7d3b6e411fabc24392;hb=95f9edf71456c8bf89a91850800f66efc2c9d4da;hpb=d247f3a07ca3c7b192d8c2381ea85ba731fcc359 diff --git a/Parasitemia/ParasitemiaUI/PiaZ.fs b/Parasitemia/ParasitemiaUI/PiaZ.fs index 2220953..18e9d6a 100644 --- a/Parasitemia/ParasitemiaUI/PiaZ.fs +++ b/Parasitemia/ParasitemiaUI/PiaZ.fs @@ -2,7 +2,6 @@ module ParasitemiaUI.PiaZ open System -open System.Windows open System.IO open System.IO.Compression @@ -10,7 +9,6 @@ open Emgu.CV open Emgu.CV.Structure open Newtonsoft.Json -open Newtonsoft.Json.Converters open Types @@ -100,7 +98,8 @@ let updateDocumentData (fromVersion : int) (toVersion : int) (data : DocumentDat /// /// Load document from a give file path. /// -/// +/// Path to the PiaZ file +/// /// If the file cannot be read let load (filePath : string) (defaultConfig : ParasitemiaCore.Config.Config) : DocumentData = use file = ZipFile.Open (filePath, ZipArchiveMode.Read) @@ -118,7 +117,7 @@ let load (filePath : string) (defaultConfig : ParasitemiaCore.Config.Config) : D for imgEntry in file.Entries do if imgEntry.Name.EndsWith (imageExtension) then use bitmap = new System.Drawing.Bitmap (imgEntry.Open (), false) - let img = new Image (bitmap) + let img = bitmap.ToImage () imgNum <- imgNum + 1 let imgJSONEntry = file.GetEntry (imgEntry.Name + ".json") use imgJSONFileReader = new StreamReader (imgJSONEntry.Open ())