Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compress image without losing the quality

I've been developing an Android app which takes picture and save it. And I want make the upload speed more faster by compressing the image. But as I compressed them using BitmapCompress, the image seems lost its quality. Here :

RAW :

enter image description here

COMPRESSED :

enter image description here

BEFORE : DIMENSION - 1920X1920 FILE SIZE - 2.94MB

AFTER : DIMENSION - 960X960 FILE SIZE - 644KB

I wonder if there's a way, a library perhaps that will solve my problem? Instagram seems to be doing this compression stuff without losing the image quality.

like image 822
CENT1PEDE Avatar asked Feb 21 '14 10:02

CENT1PEDE


People also ask

Does Compressing an image ruin quality?

Lossy compression can significantly reduce file size, but it can also reduce image quality to the point of distortion, especially if the image is overly compressed. However, quality can be maintained when compression is carefully applied.


1 Answers

Compressing will always lead to decreased quality in the one or the other way.

Here is what you could do:

  • Change your compression format to PNG, if you are not already using that.
  • Find a perfect compromise for the quality value between size and quality
like image 90
FD_ Avatar answered Sep 30 '22 10:09

FD_