06-06-2011 05:47 AM
hi Guys,
I want to reduce my image size.
on BBM when we send the image there are three to four option come. like
original 1024 x 768 size = 140.5kb
Medium 800 x 600 size = 85.8 kb
Small 640 x 480size = 54.9 kb
But whe i Try to resize image I did'nt get exact or near reslut of BBM.
I try EncodedImage.scaleImage32(640,480)
Also try this function
public Bitmap setsizeImage(EncodedImage image, int width,
int height) {
EncodedImage result = null;
int currentWidthFixed32 = Fixed32.toFP(image.getWidth());
int currentHeightFixed32 = Fixed32.toFP(image.getHeight());
int requiredWidthFixed32 = Fixed32.toFP(width);
int requiredHeightFixed32 = Fixed32.toFP(height);
int scaleXFixed32 = Fixed32.div(currentWidthFixed32,
requiredWidthFixed32);
int scaleYFixed32 = Fixed32.div(currentHeightFixed32,
requiredHeightFixed32);
result = image.scaleImage32(scaleXFixed32, scaleYFixed32);
return result.getBitmap();
}
I scale the image on 200,200 but size become 180 kb of 331
But BBM reducing more with large scale.
plz help me if anybody now about it.
06-06-2011 09:07 AM - edited 06-06-2011 09:08 AM
can u post ur code?
and also tell about version
06-06-2011 10:18 AM
06-06-2011 11:45 AM
thanks for reply.
I Try bitmap scaleInto.. but its not reducing size of image. it is doing scale well.
But I also want to reduce the image file size.
06-06-2011 11:48 AM
06-06-2011 11:54 AM
06-07-2011 05:54 AM
06-09-2011 11:44 AM
plz help me still facing this problem