Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TF 2.0 API Docs] tf.image.adjust_jpeg_quality #29331

Merged
merged 1 commit into from Jul 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions tensorflow/python/ops/image_ops_impl.py
Expand Up @@ -1965,6 +1965,16 @@ def adjust_jpeg_quality(image, jpeg_quality, name=None):

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

Usage Example:
```python
>> 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
"""
with ops.name_scope(name, 'adjust_jpeg_quality', [image]) as name:
image = ops.convert_to_tensor(image, name='image')
Expand Down