wpf 解决 编码解码器无法使用提供的流类型 The codec cannot use the type of stream provided
2012-11-20 16:49
525 查看
之前做的ListBox里列大图/article/4902649.html
图片转换的时候这段代码
有的时候会有问题 编码解码器无法使用提供的流类型 或者 The codec cannot use the type of stream provided
改成
图片转换的时候这段代码
有的时候会有问题 编码解码器无法使用提供的流类型 或者 The codec cannot use the type of stream provided
改成
BitmapImage bitImage = new BitmapImage(); bitImage.BeginInit(); bitImage.StreamSource = imageStreamSource; bitImage.EndInit(); //JpegBitmapDecoder jpeDecoder=new JpegBitmapDecoder(imageStreamSource,BitmapCreateOptions.PreservePixelFormat,BitmapCacheOption.OnLoad); //ImageSource imageSource=jpeDecoder.Frames[0]; ImageSource imageSource = bitImage; return imageSource;
相关文章推荐
- 编码解码器无法使用提供的流类型 The codec cannot use the type of stream provided
- Eclipse中使用printf报错 提示参数类型不对 已解决The method printf(String, Object[]) in the type PrintStream is not ap
- MySQL 5.7 Use The JSON Data Type(MySQL 使用 JSON 数据类型)
- sharepoint 2010 列表的数据表视图无法使用 the list cannot be displayed in datasheet view 解决方法
- 已解决:无法连接到WMI提供程序。你没有权限或者该服务器无法访问/cannot connect to WMI provider. You do not have permission or the……
- 无法使用前导 .. 在顶级目录上退出(Cannot use a leading .. to exit above the top directory)
- 已解决:无法连接到WMI提供程序。你没有权限或者该服务器无法访问/cannot connect to WMI provider. You do not have permission or the……
- 使用RecyclerView CardView相关问题 解决The hierarchy of the type is inconsistent问题
- SQL Server 对等复制配置失败后无法删除重建,报错:Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be im
- 什么时候使用Decimal 类型(When to Use the Decimal Type)
- PHP Fatal error: Cannot use object of type 报错解决之
- 已解决:无法连接到WMI提供程序。你没有权限或者该服务器无法访问/cannot connect to WMI provider. You do not have permission or the……
- vs2012 无法使用命令行提示符?ERROR: Cannot determine the location of the VS Common Tools folder.
- chrome视频无法播放的解决方法(Solve the problem of Google player cannot be played normally)
- PHP错误Cannot use object of type stdClass as array in错误的解决办法
- PHP JSON出错:Cannot use object of type stdClass as array解决方法
- 使用json_decode()转换返回数组或对象时出现:Cannot use object of type stdClass as array
- 在eclipse中如何使用RecyclerView解决The hierarchy of the type LiveCommentViewHolder is inconsistent
- Java中long类型直接赋值出现The literal xxxxxxxxxx of type int is out of range 问题的原因和解决方法
- 已解决:无法连接到WMI提供程序。你没有权限或者该服务器无法访问/cannot connect to WMI provider. You do not have permission or the……