same output as PIL.ImageOps.posterize
(img, bits)
| 258 | |
| 259 | |
| 260 | def posterize_func(img, bits): |
| 261 | ''' |
| 262 | same output as PIL.ImageOps.posterize |
| 263 | ''' |
| 264 | out = np.bitwise_and(img, np.uint8(255 << (8 - bits))) |
| 265 | return out |
| 266 | |
| 267 | |
| 268 | def shear_y_func(img, factor, fill=(0, 0, 0)): |
nothing calls this directly
no outgoing calls
no test coverage detected