Watch talks from the 2019 TensorFlow Dev Summit Watch now

tf.image.adjust_jpeg_quality

tf.image.adjust_jpeg_quality(
    image,
    jpeg_quality,
    name=None
)

Defined in tensorflow/python/ops/image_ops_impl.py.

Adjust jpeg encoding quality of an RGB image.

This is a convenience method that adjusts jpeg encoding quality of an RGB image.

image is an RGB image. The image's encoding quality is adjusted to jpeg_quality. jpeg_quality must be in the interval [0, 100].

Args:

  • image: RGB image or images. Size of the last dimension must be 3.
  • jpeg_quality: int. jpeg encoding quality.
  • name: A name for this operation (optional).

Returns:

Adjusted image(s), same shape and DType as image.