public void Test_Standart() { Assembly assembly = typeof(CoreTests).Assembly; using (Stream inStream = assembly.GetManifestResourceStream("GKTests.Resources.TGC55CLF.GED")) { using (GDMTree tree = new GDMTree()) { var gedcomProvider = new GEDCOMProvider(tree); gedcomProvider.LoadFromStreamExt(inStream, inStream); Assert.AreEqual(GEDCOMFormat.gf_Unknown, tree.Format); GDMMultimediaRecord mmRec1 = tree.XRefIndex_Find("M1") as GDMMultimediaRecord; Assert.IsNotNull(mmRec1); GDMTag blobTag = mmRec1.FindTag("BLOB", 0); Assert.IsNotNull(blobTag); var strBlob = GEDCOMUtils.GetTagStrings(blobTag).Text; Assert.IsNotNull(strBlob); MemoryStream blobStream = GEDCOMUtils.DecodeBlob(strBlob.Replace("\r\n", "")); Assert.IsNotNull(blobStream); // unsupported apple's `pict` format /*using (FileStream file = new FileStream("d:\\image.pict", FileMode.Create, FileAccess.Write)) { * blobStream.WriteTo(file); * blobStream.Close(); * }*/ using (MemoryStream outStream = new MemoryStream()) { gedcomProvider = new GEDCOMProvider(tree); gedcomProvider.SaveToStreamExt(outStream, GEDCOMCharacterSet.csASCII); } } } }