相关文章  
  • DataList和DataRepeater分页
  • Whidbey 初体验之局部类型 - partial 类型
  • C#实现阿拉伯数字转换成中文大写金额代码
  • XML 中的经典常见问题完全展播
  • 修改大型 XML 文件的有效方法展示
  • CLR 调试接口的架构与应用之调试事件
  • CLR 调试接口的架构与应用之调试框架
  • 如何用c#来制作一个activeX控件或类似的东西
  • DataGrid 中由某列的值设定行的颜色
  • 如何实现可以带详细表格的DropDownList
  •   推荐  
      科普之友首页   专利     科普      动物      植物        天文   考古   前沿科技
     您现在的位置在:  首页 >>文献 >>培训

    用C#轻松地在DOTNET中实现缩略图7


        ThumbnailImageWidth = ((width * num) / height);
        }
        if ((ThumbnailImageWidth < 1) || (num < 1))
        {
        return;
        }
        //用指定的大小和格式初始化 Bitmap 类的新实例
        Bitmap bitmap = new Bitmap(ThumbnailImageWidth, num, PixelFormat.Format32bppArgb);
        //从指定的 Image 对象创建新 Graphics 对象
        Graphics graphics = Graphics.FromImage(bitmap);
        //清除整个绘图面并以透明背景色填充
        graphics.Clear(Color.Transparent);
        //在指定位置并且按指定大小绘制 原图片 对象
        graphics.DrawImage(image, new Rectangle(0, 0, ThumbnailImageWidth, num));
        image.Dispose();  
        try
        { 
        //将此 原图片 以指定格式并用指定的编解码参数保存到指定文件
        string savepath = (ThumbnailImagePath==null?SourceImagePath:ThumbnailImagePath); 
        SaveImage(bitmap,HttpContext.Current.Server.MapPath(savepath),G

    页码:[1] [2] [3] [4] [5] [6] [7] [8]7页、共8页

         

          设为首页       |       加入收藏       |       广告服务       |       友情链接       |       版权申明      

    Copyriht 2007 - 2008 ©  科普之友 All right reserved