Skip to content

Simpler control of JPG quality #5573

@PaulWessel

Description

@PaulWessel

Description of the desired feature

If -Tj is selected in psconvert (or indirectly via jpg in modern mode) we select the JPEG ghostscript device and pass it the argument -dJPEGQ=90. Here, 100 would mean lossless compression, i.e., retain full resolution. The default ghostscript setting is 75 so I assume @joa-quim picked 90 after some experimentation so as to not loose too much fine detail. However, as the only lossy raster format offered, it seems we should offer a simpler way to control that value. You can do it via -C-dQFactor=1, as an example, but that is hardly elegant or known to many people. As a proposal I suggest we allow -Tj[+qquality] (and in modern mode jpg[+qquality]), plus we add to the documentation that the default in GMT is 90%.

PS. The reason I got onto this is that I was trying to make an image to be printed at CostCo on metal, and they have a 95 Mb file limit and my PNG was 132M. Using jpg I got something in the 30Mb range whereas Photoshop was able to do 85Mb with very little lossy compression, so I got suspicious.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions