Hi,

I think the code below can help:

private byte[] compressPhoto(Bitmap bm) {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        bm.compress(CompressFormat.JPEG, 75, bos);
        return bos.toByteArray();
}

Cordially,
    Gink

On 17 abr, 01:04, perumal316 <perumal...@gmail.com> wrote:
> Hi All,
>
> In my application, I am invoking the camera application and taking a
> picture and saving it in a particular directory (E.g. /sdcard etc)
>
> The picture is saved as a JPEG image. How do I reduce the size of the
> image? Is there any available image encoder or compression available?
>
> I came across another posting at:
>
> http://stackoverflow.com/questions/8757341/android-reduce-size-of-cam...
>
> But this is scaling the image. I am looking for something that can compress
> or encode. Is it possible?
>
> Thanks In Advance,
>
> Perumal

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to