zoukankan      html  css  js  c++  java
  • 半透明图像生成程序

    Graphics g=pictureBox2.CreateGraphics();
                Bitmap bitmap
    =new Bitmap(openFileDialog1.FileName);
                
    float[][] matrixitems=new float[]{1,0,0,0,0},
                
    new float[]{0,1,0,0,0},
                
    new float[]{0,0,1,0,0},
                
    new float[]{0,0,0,0.2f,0},
                
    new float[]{0,0,0,0,1}
                }
    ;
                ColorMatrix colormatrix
    =new ColorMatrix(matrixitems);
                ImageAttributes imageAtt
    =new ImageAttributes();
                imageAtt.SetColorMatrix(colormatrix,ColorMatrixFlag.Default,ColorAdjustType.Bitmap);
                
    int iWidth=bitmap.Width;
                
    int iHeight=bitmap.Height;
                
    //g.DrawLine(new Pen(Color.Black,25),new Point(10,35),new Point(200,35));
                g.DrawImage(bitmap,new Rectangle(30,0,iWidth,iHeight),0,0,iWidth,iHeight,GraphicsUnit.Pixel,imageAtt);    
                bitmap.Dispose();
                g.Dispose();
  • 相关阅读:
    上下文有关文法
    sqlserver cte 速度慢
    hibernate tools eclipse 安装
    sts java nullpointer exception
    Oracle RAC集群体系结构
    bean scope scoped-proxy
    hibernate persist不能插入到表中
    system.out 汉字乱码
    NoSQL数据库(转)
    在PowerShell中获取本地的RAM信息(容量)
  • 原文地址:https://www.cnblogs.com/lidune/p/546676.html
Copyright © 2011-2022 走看看