(file, data)
| 117 | |
| 118 | |
| 119 | def write(file, data): |
| 120 | if file.endswith(".float3"): |
| 121 | return writeFloat(file, data) |
| 122 | elif file.endswith(".flo"): |
| 123 | return writeFlow(file, data) |
| 124 | elif file.endswith(".ppm"): |
| 125 | return writeImage(file, data) |
| 126 | elif file.endswith(".pgm"): |
| 127 | return writeImage(file, data) |
| 128 | elif file.endswith(".png"): |
| 129 | return writeImage(file, data) |
| 130 | elif file.endswith(".jpg"): |
| 131 | return writeImage(file, data) |
| 132 | elif file.endswith(".pfm"): |
| 133 | return writePFM(file, data) |
| 134 | else: |
| 135 | raise Exception("don't know how to write %s" % file) |
| 136 | |
| 137 | |
| 138 | def readPFM(file): |
nothing calls this directly
no test coverage detected