店面形象到SD卡 [英] store image to SD card

查看:146
本文介绍了店面形象到SD卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用裁剪功能在我的Andr​​oid应用程序,它工作正常,但我想裁剪图像保存到我的 SD卡。对于需要什么步骤要遵循?

i'm using cropping functionality in my android application and it works fine but i want to save cropped image to my SD Card. For that what steps needs to be followed?

推荐答案

如果在位图您裁剪叫做 yourBitmap

File sdcard = Environment.getExternalStorageDirectory();
File f = new File (sdcard, "filename.png");
FileOutputStream out = new FileOutputStream(f);
yourBitmap.compress(Bitmap.CompressFormat.PNG, 90, out)

这篇关于店面形象到SD卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆