コード例 #1
0
        public Bitmap ConstructBitmap(Microsoft.WindowsAPICodePack.Shell.ShellObject shellObject, int sideSize)
        {
            using (FileStream stream = new FileStream(shellObject.ParsingName, FileMode.Open, FileAccess.Read))
            {
                XyzFileDefinition file = new XyzFileDefinition(stream);

                using (MemoryStream imageStream = new MemoryStream(Convert.FromBase64String(file.EncodedImage)))
                {
                    return((Bitmap)Image.FromStream(imageStream));
                }
            }
        }
コード例 #2
0
 public void Load(Microsoft.WindowsAPICodePack.Shell.ShellObject shellObject)
 {
     Load(new FileInfo(shellObject.ParsingName));
 }
コード例 #3
0
 public Bitmap ConstructBitmap(Microsoft.WindowsAPICodePack.Shell.ShellObject shellObject, int sideSize) => new Bitmap(sideSize, sideSize);