tf.image.adjust_jpeg_quality
Stay organized with collections
Save and categorize content based on your preferences.
Adjust jpeg encoding quality of an RGB image.
tf.image.adjust_jpeg_quality(
image, jpeg_quality, name=None
)
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
|
Python int or Tensor of type int32. jpeg encoding quality.
|
name
|
A name for this operation (optional).
|
Returns |
Adjusted image(s), same shape and DType as image .
|
Usage Example:
>> import tensorflow as tf
>> x = tf.random.normal(shape=(256, 256, 3))
>> tf.image.adjust_jpeg_quality(x, 75)
Raises |
InvalidArgumentError
|
quality must be in [0,100]
|
InvalidArgumentError
|
image must have 1 or 3 channels
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-01 UTC."],[],[]]