zoukankan      html  css  js  c++  java
  • MemoryStream转imageSource

    // 设置图像控件                     Image image = new Image();                     panel.IsEnabled = false;                     using (MemoryStream ms = new MemoryStream(item.AttachConnect))                     {                       //  var decoder = BitmapDecoder.Create(ms,                       //BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad);                         var imageSource = new BitmapImage();                         imageSource.BeginInit();                         imageSource.StreamSource = ms;                         imageSource.EndInit();

                            // Assign the Source property of your image                         image.Source = imageSource;                     }

  • 相关阅读:
    归并排序
    mysql优化
    树结构
    urllib库的使用
    linux常用命令
    mysql慢查询
    支付宝第三方支付
    类型(type)判断
    c语言自带的排序与查找
    多字节与宽字节转换
  • 原文地址:https://www.cnblogs.com/gaohao/p/4994170.html
Copyright © 2011-2022 走看看