Skip to content

Specifying image quality

Patrick Crowley edited this page Apr 20, 2018 · 6 revisions

When working with lossy image formats like JPEG, you can control how much the output image will be compressed by specifying its "quality".

MiniMagick

The quality of the output JPEG image is specified using the -quality option, which you can specify as a saver option:

ImageProcessing::Vips
  .resize_to_limit(400, 400)
  .saver(quality: 75) # specify quality
  .call(image)

Vips

The quality of the output JPEG image is specified using the :Q saver option:

ImageProcessing::MiniMagick
  .resize_to_limit(400, 400)
  .saver(quality: 75) # specify quality
  .call(image)
Clone this wiki locally