当前位置: 首页 > news >正文

可信网站是什么百度权重是什么

可信网站是什么,百度权重是什么,广告公司电话,如何 在网站上面做推广大家好,今天接着上一篇文章继续讲。 下面是今天的方法: (1)Bitmap.MakeTransparent 方法:使此 Bitmap的默认透明颜色透明。 private void MakeTransparent_Example1(PaintEventArgs e) { // Create a Bitmap object…

大家好,今天接着上一篇文章继续讲。

下面是今天的方法:

(1)Bitmap.MakeTransparent 方法:使此 Bitmap的默认透明颜色透明。

private void MakeTransparent_Example1(PaintEventArgs e)
{

    // Create a Bitmap object from an image file.
    Bitmap myBitmap = new Bitmap("Grapes.gif");

    // Draw myBitmap to the screen.
    e.Graphics.DrawImage(myBitmap, 0, 0, myBitmap.Width,
        myBitmap.Height);

    // Make the default transparent color transparent for myBitmap.
    myBitmap.MakeTransparent();

    // Draw the transparent bitmap to the screen.
    e.Graphics.DrawImage(myBitmap, myBitmap.Width, 0,
        myBitmap.Width, myBitmap.Height);
}

private void MakeTransparent_Example2(PaintEventArgs e)
{

    // Create a Bitmap object from an image file.
    Bitmap myBitmap = new Bitmap("Grapes.gif");

    // Draw myBitmap to the screen.
    e.Graphics.DrawImage(
        myBitmap, 0, 0, myBitmap.Width, myBitmap.Height);

    // Get the color of a background pixel.
    Color backColor = myBitmap.GetPixel(1, 1);

    // Make backColor transparent for myBitmap.
    myBitmap.MakeTransparent(backColor);

    // Draw the transparent bitmap to the screen.
    e.Graphics.DrawImage(
        myBitmap, myBitmap.Width, 0, myBitmap.Width, myBitmap.Height);
}

(2)Bitmap.SetPixel(Int32, Int32, Color) 方法:设置此 Bitmap中指定像素的颜色。

private void SetPixel_Example(PaintEventArgs e)
{

    // Create a Bitmap object from a file.
    Bitmap myBitmap = new Bitmap("Grapes.jpg");

    // Draw myBitmap to the screen.
    e.Graphics.DrawImage(myBitmap, 0, 0, myBitmap.Width,
        myBitmap.Height);

    // Set each pixel in myBitmap to black.
    for (int Xcount = 0; Xcount < myBitmap.Width; Xcount++)
    {
        for (int Ycount = 0; Ycount < myBitmap.Height; Ycount++)
        {
            myBitmap.SetPixel(Xcount, Ycount, Color.Black);
        }
    }

    // Draw myBitmap to the screen again.
    e.Graphics.DrawImage(myBitmap, myBitmap.Width, 0,
        myBitmap.Width, myBitmap.Height);
}

(3)Bitmap.SetResolution(Single, Single) 方法:设置此 Bitmap 的分辨率。

(4)Bitmap.UnlockBits(BitmapData) 方法:从系统内存解锁此 Bitmap。

private void LockUnlockBitsExample(PaintEventArgs e)
    {

        // Create a new bitmap.
        Bitmap bmp = new Bitmap("c:\\fakePhoto.jpg");

        // Lock the bitmap's bits.  
        Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
        System.Drawing.Imaging.BitmapData bmpData =
            bmp.LockBits(rect, System.Drawing.Imaging.ImageLockMode.ReadWrite,
            bmp.PixelFormat);

        // Get the address of the first line.
        IntPtr ptr = bmpData.Scan0;

        // Declare an array to hold the bytes of the bitmap.
        int bytes  = Math.Abs(bmpData.Stride) * bmp.Height;
        byte[] rgbValues = new byte[bytes];

        // Copy the RGB values into the array.
        System.Runtime.InteropServices.Marshal.Copy(ptr, rgbValues, 0, bytes);

        // Set every third value to 255. A 24bpp bitmap will look red.  
        for (int counter = 2; counter < rgbValues.Length; counter += 3)
            rgbValues[counter] = 255;

        // Copy the RGB values back to the bitmap
        System.Runtime.InteropServices.Marshal.Copy(rgbValues, 0, ptr, bytes);

        // Unlock the bits.
        bmp.UnlockBits(bmpData);

        // Draw the modified image.
        e.Graphics.DrawImage(bmp, 0, 150);
    }

今天要介绍的就是这么多,我们下篇文章再见。

http://www.zhongyajixie.com/news/32915.html

相关文章:

  • 济南做微网站推广哈尔滨seo优化公司
  • 哪些网站做推广比较有效果知乎怎么申请关键词推广
  • 单位制作网站备案怎么做个人网页
  • cbd网站建设网络推广都有什么方式
  • 互联网建站网站站长工具seo综合查询怎么使用的
  • 如何起手做网站项目厦门百度关键词seo收费
  • 网站建设7个基本流程图百度推广客户端
  • 打开网站显示404seo网站优化培训怎么样
  • 怎么在百度首页做网站seo关键词推广案例
  • 传媒公司做网站条件推广引流方法有哪些?
  • 东莞市做网站的绍兴seo网站管理
  • 做pc端网站适配seo是怎么优化上去
  • 网页界面设计网站广州日新增51万人
  • 网站建设的内部风险分析优帮云查询数据云查询
  • 为企业设计一个网站seo优化咨询
  • 东莞建设网站公司哪家好品牌运营推广方案
  • wordpress 下载选择seo如何提升排名收录
  • 深圳建设工程交易服务网app处理事件seo软件
  • 网站视频链接怎么做的google关键词
  • 易语言做网站外挂亚马逊seo是什么意思
  • 深圳o2o网站建设免费域名解析网站
  • 有经验的永州网站建设做网站怎么优化
  • 宁波建设网站网络推广有多少种方法
  • 怎么套用模板做网站贵阳百度推广电话
  • 东丽区做网站百度最新收录方法
  • 做水果网站特点分析报告关键词搜索工具有哪些
  • 个人主页在哪里找关键词seo
  • 冠县网站建设搜狐新闻手机网
  • 新闻发稿计划怎么写免费的seo教程
  • 什么网站可以做装修效果图的谷歌网页