Newbit(newbit technology)
net 其实还是很好绘制图形的 你可以看下 Graphics 类 Dim d As New BitmapMeWidth, MeHeight ‘一个图片吧 Dim g As Graphics = GraphicsFromImaged’绘制 准备在这个图片是进行 然后 就是你绘制的东西了 线 就是 gDrawLine圆 弧度 就用 gDrawArcPensBlack;Private Sub Button1_ClickByVal sender As SystemObject, ByVal e As SystemEventArgs Handles Button1Click Dim bmp As String bmp = quotD\IMG_0011JPGquotDim NewBitmap As Dim MyBitmap As New BitmapbmpNewBitmap = New BitmapMyBitmap, CTypeMe。
示例代码Graphics g = GraphicsFromImagenew Bitmap100, 100gDrawLinenew PenColorBlack, new Point10, 10, new Point50, 10讲解使用新建100x100大小的Bitmap对象,初始化Graphics类对象g 然后,使用Graphics类的DrawLine画线方法,画出一个坐标10105010的黑色线;原始图片黑白处理后图片原始图片黑白处理后图片部分处理代码codeDim ts2 As IThresholder = New GlobalMeanThresholdinbmpDim tsBMP As New BitmapPictureBox1Width, PictureBox1Heightts2RenderToBitmaptsBMPPictureBox6Image = tsBMPPictureBox6Height = PictureBox1HeightPicture。
软糖来回答把能够读取出image的图片都可以转化为bitmap的使用GDI+绘制到新的bitmap上去就好了using SystemDrawingImage pic = ImageFromFilepathBitmap bit = new BitmappicWidth, picHeightGraphics g = GraphicsFromImagebitgDrawImagepic, 0, 0gDispose这个;Matrix m = new MatrixmsetScale40f, 40fBitmap newBitmap = BitmapcreateBitmapoldBitmap, 0, 0, oldBitmapgetWidth, oldBitmapgetHeight, m, true把这段代码写在图片点击事件中,newBitmap设置为imageview的背景就行了这时newBitmap是oldBitmap的4倍大。
newbits
=2宽高设置成原来的12 Bitmapbit=newBitmapFactorydecodeFilepath,optsshow_bit还有很多属性,你去查查吧,另外如果非要适应屏幕大小的话,你还需要获取屏幕的大小,然后图片大小跟屏幕大小比较,没弄过一定要图片跟屏幕大小填充满的,就算填充满,一定也会失真 android中怎么是bitmap缩小。
public static Bitmap ToGrayBitmapbyte rawValues, int width, int height 申请目标位图的变量,并将其内存区域锁定 Bitmap bmp = new Bitmapwidth, height, PixelFormatFormat8bppIndexedBitmapData bmpData = bmpLockBitsnew Rectangle0, 0, width, height,ImageLockMode。
评论