using (Stream stream = new fileStream(filepath,fileMode.Open,fileAccess.Read,fileShare.Read)) { TiffBitmapDecoder decoder = new TiffBitmapDecoder(stream,BitmapCreateOptions.IgnoreImageCache,BitmapCacheOption.None); BitmapSource bitmapsource = decoder.Frames[0]; }
如果有人遇到类似的问题并解决了它.请这样分享一些想法.
解决方法 您可以尝试 BitmapDecoder.Create()这允许您读取任何图像的流类型using (Stream stream = new fileStream(filepath,fileShare.Read)) { BitmapDecoder decoder = BitmapDecoder.Create(stream,BitmapCacheOption.None); BitmapSource bitmapsource = decoder.Frames[0]; }总结
以上是内存溢出为你收集整理的c# – 错误:“读取.tiff文件时,编解码器无法使用提供的流类型”全部内容,希望文章能够帮你解决c# – 错误:“读取.tiff文件时,编解码器无法使用提供的流类型”所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)