保存在android的PNG图像图像、存在、android、PNG

由网友(ジ烟雨霓裳ベ)分享简介:我开发的涂料应用程序,我救我的绘画为png图片。对于绘画,我用了一个位图创建画布。它的工作原理,但形象被破坏。任何一个可以帮助我。我没有一个真正的手机,但在模拟器上进行检查。那是问题模拟器。我认为这是非常小的处理能力。我对吗?谢谢你。I am developing paint app and i save my d...

我开发的涂料应用程序,我救我的绘画为png图片。对于绘画,我用了一个位图创建画布。它的工作原理,但形象被破坏。任何一个可以帮助我。我没有一个真正的手机,但在模拟器上进行检查。那是问题模拟器。我认为这是非常小的处理能力。我对吗? 谢谢你。

I am developing paint app and i save my drawing as png image. For drawing i used canvas that created with a bitmap. it works but image was corrupted. Can any one help me. I didn't check it with a real phone but on the emulator. Is that problem with emulator. I think it has very small processing ability. Am i right? Thank you.

推荐答案

仿真器工作正常。你用什么一块code存储位图PNG?

The emulator works fine. What piece of code did you use to store the bitmap as png?

细下工作在模拟器中:



Bitmap bitmap = createYourBitmap();
OutputStream stream = new FileOutputStream("/sdcard/test.png");
/* Write bitmap to file using JPEG or PNG and 80% quality hint for JPEG. */
bitmap.compress(CompressFormat.PNG, 80, stream);
stream.close();
阅读全文

相关推荐

最新文章