ImageMagick jpeg quality extremely low -
i have following image 188_f.jpg
:
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:
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.)
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:
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/)
(left: original - 74.8kb, right: converted - 63kb)
Comments
Post a Comment