BloomTests.Book.BookTestsBase.MakeSamplePngImageWithMetadata C# (CSharp) Method

MakeSamplePngImageWithMetadata() protected method

protected MakeSamplePngImageWithMetadata ( string path ) : void
path string
return void
        protected void MakeSamplePngImageWithMetadata(string path)
        {
            var x = new Bitmap(10, 10);
            SIL.IO.RobustIO.SaveImage(x, path, ImageFormat.Png);
            x.Dispose();
            using (var img = PalasoImage.FromFileRobustly(path))
            {
                img.Metadata.Creator = "joe";
                img.Metadata.CopyrightNotice = "Copyright 1999 by me";
                RetryUtility.Retry(() => img.SaveUpdatedMetadataIfItMakesSense());
            }
        }