C#分割大尺寸tif图片文件遇到问题

pengyming 2016-02-19 11:38:16
C#截取tiff图片文件,相同代码在处理较小尺寸的tiff文件的时候截取图片和压缩图片都可以得到满意的结算,但是如果图片尺寸太大就会出现截取的图片和压缩的图片为黑的情况
不可处理的tiff文件地址:http://pan.baidu.com/s/1bgephs
可处理的tiff文件地址:http://pan.baidu.com/s/1i4z2Jxr
...全文
209 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
pengyming 2016-02-19
  • 打赏
  • 举报
回复
获取缩略图代码
 Url = this.txt_AUrl.Text;

            FileStream fileStream = new FileStream(Url, FileMode.Open);
            Stream stream = fileStream as Stream;
            System.Drawing.Image initImage = System.Drawing.Image.FromStream(stream, true);

            Bitmap imgBit = new Bitmap(initImage, initImage.Width / 100, initImage.Height / 100);
            imgBit.Save("D:\\Gif\\" + this.txt_name.Text, System.Drawing.Imaging.ImageFormat.Gif);

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧