Improving quality of 'convert -define jpeg:extent=200KB'

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Locked
dcotto
Posts: 15
Joined: 2019-09-24T15:24:28-07:00
Authentication code: 1152

Improving quality of 'convert -define jpeg:extent=200KB'

Post by dcotto »

I was wondering if theres anything i can do to improve the quality of the command below:
convert -define jpeg:extent=200KB' without having to change the KB size.

Photoshop has a 'quality' control by percentage and when it targets around the same KB in photoshop i notice the quality is much much cleaner and with very little JPEG artifacts. However, with imagemagick theres enough jpeg artifacts were its noticeable especially with white text and red backgrounds. Is there a way to improve the quality without changing KB size. any help would be great. thank you

vincent.tschanz
Posts: 9
Joined: 2019-10-11T01:05:00-07:00
Authentication code: 1152

Re: Improving quality of 'convert -define jpeg:extent=200KB'

Post by vincent.tschanz »

The artifact you are talking about is due to the Chroma-subsampling. (check wikipedia to know more about that)

IM is probably using a 4:2:0 subsampling (ugly with pure red or blue colors) where Photoshop is keeping it at 4:4:4

you can force IM to keep 4:4:4 with

Code: Select all

-sampling-factor 1x1
https://www.imagemagick.org/script/comm ... ing-factor

dcotto
Posts: 15
Joined: 2019-09-24T15:24:28-07:00
Authentication code: 1152

Re: Improving quality of 'convert -define jpeg:extent=200KB'

Post by dcotto »

wow amazing! the quality is even better than what i imagined and better than photoshop in this regard.
Thank you so much!

Locked