I have couple of images that are of 32MBs of size and I want to change their size from 32MBs to 100Kbs or any KBs of size without affecting its colours.
The commands I am trying are:
muhammad@muhammad-mohsin:~/scans$ find . -iname '*.png' -exec mogrify -format jpg "*.png" {} +
muhammad@muhammad-mohsin:~/$ find . -type f -iname *.png -delete
muhammad@muhammad-mohsin:~/$ find . -iname '*.jpg' -exec mogrify -define jpeg:extent=300kb -strip -quality 90 -scale 90% *.jpg {} +
Here, first I convert a PNG to JPG that reduce its size from 32Mbs to 5.8Mbs and everything stays same but when I use 3rd command, it removes background color in image and making it grayscale sort of blurry.
However, the text is still readable but colors and background logo does not.
How I can achieve this with convert, mogrify or any other tool? I tried every possible thing so far.