ImageMagick jpeg quality extremely low -


i have following image 188_f.jpg:

enter image description here

and following code:

<?php     $ss = "convert 188_f.jpg -quality 95% -set colorspace rgb -colorspace cmyk 188_f_cmyk.jpg 2>&1";     echo ">" . $ss . "<br />";     echo system($ss); ?> 

when run code, image output:

enter image description here

which indeed in cmyk, when viewed @ 100% there significant loss in quality. (wasn't sure if se did conversions when uploading, uploaded above images via ftp can examine them directly if needed.)

enter image description here

i tried moving quality argument around, , without percent sign, , looked through imagick guide, couldn't find explanation why quality goes down. output file has same number of pixels.

edit: making no other changes script except changing colorspace options, here results:

enter image description here

edit 2: tried multiple different profiles, using this:

convert 188_f.jpg -quality 95% -profile profiles\\uncoatedfogra29.icc -colorspace cmyk 188_f_cmyk.jpg 2>& 

none of them got rid of pixelatedness.

i managed output indistinguishable original image following options passed either convert or mogrify:

-filter triangle -define filter:support=2 -unsharp 0.25x0.25+8+0.065 -dither none -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -interlace none -colorspace srgb -strip

(ref: https://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/)

enter image description here

(left: original - 74.8kb, right: converted - 63kb)


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -