在Android的COM preSS图片 [英] Compress Image in android

查看:86
本文介绍了在Android的COM preSS图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提出一个应用程序,它采用图像从相机,然后通过电子邮件发送。

I am making an application which takes image from the camera and then email it.

朋友,因为你知道,从相机中的图像可能是太多的分辨率和尺寸,以及如2.0MB多所以我想是重新大小的尺寸以及分辨率,这样我可以附加该文件以电子邮件中的图像。

Friends since you know that images from camera may be of too much resolution and in size as well e.g. 2.0MB and more so what i want is to re-size the image in size as well as in resolution so that i could attach that file to the email.

所以,有谁能够给我一些code样品或一些指引,以克服我的问题。

So can anybody give me some code sample or some guidelines to get over my problem.

在此先感谢

推荐答案

你可以做到这一点,以玉米为preSS的BitMap。

you can do this to compress BitMap..

mBitmap = Bitmap.createScaledBitmap(mBitmap, 160, 160, true);

这篇关于在Android的COM preSS图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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