overflow happens in tf.image.adjust_gamma when gamma is very small
Hey @drewshark! can I work on this issue? @drewshark I was able to replicate this issue. As a workaround could you try to use a smaller value of gamma or the algorithm which doesn't include floating point numbers. Please let us know?
Thank you! Hi @sushreebarsa , sure I will use floating tensor instead. @drewshark Thank you for your response here!
Could you please let us know if we can move this issue to closed status if the workaround worked for you ?
Thank you! Sure, I am closing this issue. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62393">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62393">No</a>

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

2.14.0

### Custom code

Yes

### OS platform and distribution

_No response_

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

When `gamma` is a very small value (e.g., 0.00001 or 0) and input tensor is a positive integer tensor, tf.image.adjust_gamma might output largely negative value. Specifically, if gamma=0 and gain=2, the expected output should be 2 according to the formula: `Out = gain * In**gamma`, but the current result is -9223372036854775808.


It seems that the overflow issue happens when executing this code:
https://github.com/tensorflow/tensorflow/blob/9fa48d09da86703782f68c523327ad57c2cca8ed/tensorflow/python/ops/image_ops_impl.py#L2372

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
image = tf.constant(9, dtype='int64')
gamma = 0
gain = 2
out = tf.image.adjust_gamma(image,gamma,gain)
print(out)
```


### Relevant log output

```shell
tf.Tensor(-9223372036854775808, shape=(), dtype=int64)
```
