zetbaitsu / Compressor

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

How to input maxHeight and maxWidth #113

Open patolax opened 6 years ago

patolax commented 6 years ago

This is more a question than a issue.

If I don't set maxHeight and maxWidth library picks up following variables. private int maxWidth = 612; private int maxHeight = 816;

How to determine and input width and height so I can retain quality in different devices/screen sizes while reducing storage capacity.

If I provide original image dimensions, but quality 75, the compressed result from the library is bigger than original capacity.

I have also posted this on SO. https://stackoverflow.com/questions/52852146/determine-image-size-to-reduce-image-size-android Thanks.