0
我有我想保存为图像(JPEG/PNG)的PictureDrawable,但似乎无法找到任何有关此信息的信息。如何在Android中将PictureDrawable保存为JPEG/PNG文件
我试过,但它似乎没有工作
PictureDrawable myDrawable = GetPictureDrawable();
Bitmap bitmap = Bitmap.createBitmap(200, 200, Bitmap.Config.ARGB_8888);
myDrawable.draw(new Canvas(bitmap));
bitmap.compress(CompressFormat.JPEG, 100, new FileOutputStream("/MyLocation/MyImage.jpg"));
什么是我错在做什么?
你的logcat没有什么? – 2011-06-02 13:35:45
我的logcat中没有任何内容 – 2011-06-02 14:44:47