Lowering the image size is disturbing background image and color using minimagick and mogrify

113 views Asked by At

I am using Mogrify in Ubuntu to scale my images to lower size that is working fine for most of the images.

Problem is my all PNG images are above 30MBs and if I try to scale them to 300kB it starts to disturbs the background colors and fade them off.

What I do is:

  1. Convert png image to jpg using below command.

find . -iname '*.png' -exec mogrify -format jpg "*.png" {} +

At that point everything stay same and fine but size is still 30MBs

Then I do below command to give it low size but it disturbs colors of entire image.

find . -iname '*.png' -exec mogrify -define jpeg:extent=300kb -strip -quality 90 -scale 90% *.jpg {} +

How I can easily convert my images sizes to 30kBs or even 40kBs without disturbing the image colors.

My main goal is to preserve original colors. It does work but now its not!

0

There are 0 answers