All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
Delphi主菜单组件(TMainMenu)技巧
PHP生成静态HTML文章发布系统的思路_[PHP教程]
XSL学习教程:运算符和函数_[XML教程]
自动备份SQL,Server数据库中用户创建的Stored,Procedures_[SQL,Server教程]
ASP.NET实现投票结果的图片进度条显示代码_[Asp.Net教程]
ASP.NET实例:在GridView使用HyperLinkField,属性的链接_[Asp.Net教程]
apache中httpd.conf的中文件详解_[PHP教程]
简单介绍,ASP.NET,中的运算操作符_[Asp.Net教程]
sql server的保留关键字_[SQL Server教程]
C#教程:MouseDown和MouseUp事件
Reading number is top 10 pictures
俞敏洪在清华终于说了实话
超级大兔子
宝贝系列
The little woman's bright wire2
30 beautiful school beauty6
Absolutely shocked. National geographic 50 animal photographys6
Black and white also sexy--YanLiu1
两张抽象画
The real super beauty14
The real super beauty6
Download software ranking
Unix video tutorial12
Sora aoi's film--cangkong_Blue.Sky
Boxer's Top ten classic battle1
Unix video tutorial14
Unix video tutorial13
The Bermuda triangle1
Boxer's Top ten classic battle3
Visual C++界面编程技术
Unix video tutorial3
Be there or be square
delv published in(发表于) 2014/1/24 9:02:16 Edit(编辑)
.Net中使用GDI+提高gif图片画质的代码_[Asp.Net教程]

.Net中使用GDI+提高gif图片画质的代码_[Asp.Net教程]

.Net中使用GDI+提高gif图片画质的代码_[Asp.Net教程]

  在.net中使用GDI+来提高gif图片画质,这就是“Octree” 算法。“Octree”算法允许我们插入自己的算法来量子化我们的图像。


  使用octreequantizer很方便:


system.drawing.bitmap b = new System.Drawing.Bitmap(“c:\original_image.gif“);
  System.Drawing.Image thmbnail = b.GetThumbnailImage(100,75,null,new IntPtr());
  OctreeQuantizer quantizer = new OctreeQuantizer ( 255 , 8 ) ;
  using ( Bitmap quantized = quantizer.Quantize ( thmbnail ) )
  {
  quantized.Save(“c:\thumnail.gif“, System.Drawing.Imaging.ImageFormat.Gif);
  }
  octreequantizer grayquantizer = new GrayscaleQuantizer ( ) ;
  using ( Bitmap quantized = grayquantizer.Quantize ( thmbnail ) )
  {
  quantized.Save(“c:\thumnail.gif“, System.Drawing.Imaging.ImageFormat.Gif);
  }


  主要代码就这么多,是不是很简单呢?


本文由设计家园 收集整理







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.