GitUI.Editor.FileViewer.CreateImage C# (CSharp) Method

CreateImage() private static method

private static CreateImage ( string fileName, Stream stream ) : Image
fileName string
stream Stream
return Image
        private static Image CreateImage(string fileName, Stream stream)
        {
            if (IsIcon(fileName))
            {
                using (var icon = new Icon(stream))
                {
                    return icon.ToBitmap();
                }
            }

            return new Bitmap(CreateCopy(stream));
        }