zetbaitsu / Compressor

An android image compression library.
7.08k stars 963 forks source link

Does not work #95

Open CurvesTech opened 6 years ago

CurvesTech commented 6 years ago

The resulting image was bigger than the actual image. i set max width 640 and height 480, expecting result in kb, but a 3 mb image went up 9 mb.

Hemant0601 commented 6 years ago

samer here +1

phoeson commented 6 years ago

yes, I have the same issue, this is my code: Bitmap bitmap = new Compressor(this) .setMaxHeight(2000) .setMaxWidth(2000) .setQuality(80) .compressToBitmap(file); original image size is: 4096 x 2304 and the result bitmap size is 36MB

jifferon commented 5 years ago

Same here

im-ng commented 5 years ago

Same here

FaridBen95 commented 4 years ago

@ng28 @egorikem @KevinPan @Hemant0601 @CurvesTech works well in some devices but do the same in android oreo but i can't get access to the phone

does it throw any exception ?

FaridBen95 commented 4 years ago

iI guess it has a relation with ExifInterface because some phone change the orientation of the images

SMontiel commented 4 years ago

To compress, this library uses quality to create the bitmap and, according to Android documentation, when you use PNG the quality is ignored.

Because of that the image grows, sometimes. Well, that was my problem. So use JPG...