Bitmap bm = Bitmap.createBitmap(320, 480, Config.ARGB_8888); Canvas canvas = new Canvas(bm); Paint p = new Paint(); canvas.drawRect(50, 50, 200, 200, p); canvas.save(Canvas.ALL_SAVE_FLAG ); canvas.restore(); File f = new File("/sdcard/0.png"); F
CSharpGL(19)用glReadPixels把渲染的内容保存为PNG图片(C#) 效果图 本文解决了将OpenGL渲染出来的内容保存到PNG图片的方法. 下载 CSharpGL已在GitHub开源,欢迎对OpenGL有兴趣的同学加入(https://github.com/bitzhuwei/CSharpGL) glReadPixels C#里声明glReadPixels的形式如下: /// <summary> /// Reads a block of pixels from the fr