gif默认就是Format8bppIndexedBitmap OriginalBitmap=new Bitmap(Server.MapPath("aaa.bmp"));
OriginalBitmap.Save(Server.MapPath("cc.gif"),ImageFormat.Gif);
Bitmap OutBitmap = new Bitmap(Server.MapPath("ccc.gif"));
Response.Write(OutBitmap.PixelFormat+"<br>");
OriginalBitmap.Save(Server.MapPath("cc.gif"),ImageFormat.Gif);
Bitmap OutBitmap = new Bitmap(Server.MapPath("ccc.gif"));
Response.Write(OutBitmap.PixelFormat+"<br>");
解决方案 »
- 我在C#.net后台写一个注册一个Comfirm对话框,然后如何获取该对话框返回值
- MVC3中使用dynatree,从数据库中读取数据返回JSON类型数据,加载到dynatree上
- web.config
- 关于url重写的另一个问题
- 程序怎么才可以让页面报出404的错误,
- 为什么ASP.NET下的程序看不到组件???
- 请问:如何把数据库中存储的图片显示在页面上?图片在数据库的存储格式如"f.gif"?先谢谢啦!
- 抓取网页后,怎么用正则过滤自己想要的数据?比如图片
- 非常菜的问题:水晶报表简单设计
- 谁有.net连接mysql的类?
- 数据库时间字段的问题?
- datalist中的EditCommand事件如何触发?
color table. GDI+ will always convert your image to 8bpp from 32bpp using
a default "rainbow" paletteFor more, please have a look at
http://www.dotnet247.com/247reference/msgs/28/140382.aspxAlso there are some useful links of MS knowledge.
我现在用看微软的HOW TO: Save a .gif File with a New Color Table By Using Visual C# .NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;319061
我用上面给出的示例代码试了一下,好像还可以,不过生成的图像是灰度的,不知道怎么才能生成彩色16色或32色的?她的代码中说可以自己写生成调色板的算法,可我一点也不懂啊~~