
// Create a BitMap object of the image to be worked withfinal Bitmap bm = BitmapFactory.decodeStream( ..some image.. );// The openfileOutput() method creates a file on the phone/internal storage in the context of your application final fileOutputStream fos = openfileOutput("my_new_image.jpg",Context.MODE_PRIVATE);// Use the compress method on the BitMap object to write image to the OutputStreambm.compress(CompressFormat.JPEG,90,fos); 总结 以上是内存溢出为你收集整理的android – 将图像复制到内存全部内容,希望文章能够帮你解决android – 将图像复制到内存所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)