Equivalent of PIL Posterize.
(image, bits)
| 231 | |
| 232 | |
| 233 | def posterize(image, bits): |
| 234 | """Equivalent of PIL Posterize.""" |
| 235 | shift = 8 - bits |
| 236 | return tf.bitwise.left_shift(tf.bitwise.right_shift(image, shift), shift) |
| 237 | |
| 238 | |
| 239 | def rotate(image, degrees, replace): |
nothing calls this directly
no outgoing calls
no test coverage detected