(image)
| 59 | |
| 60 | |
| 61 | def get_image_shape(image): |
| 62 | if isinstance(image, str): |
| 63 | return Image.open(image).size |
| 64 | elif isinstance(image, np.ndarray): |
| 65 | return image.shape |
| 66 | elif isinstance(image, Image.Image): |
| 67 | return image.size |
| 68 | else: |
| 69 | raise NotImplementedError |
| 70 | |
| 71 | def is_platform_win(): |
| 72 | return sys.platform == "win32" |
no outgoing calls
no test coverage detected