public void Flatten() { var layer1 = new Layer(_image, "test1", ImageType.Rgb); _image.InsertLayer(layer1, 0); var layer2 = new Layer(_image, "test2", ImageType.Rgb); _image.InsertLayer(layer2, 0); Assert.AreEqual(2, _image.Layers.Count); _image.Flatten(); Assert.AreEqual(1, _image.Layers.Count); }