| 156 | |
| 157 | |
| 158 | object |
| 159 | ImageBuf_interppixel (const ImageBuf &buf, float x, float y, |
| 160 | ImageBuf::WrapMode wrap = ImageBuf::WrapBlack) |
| 161 | { |
| 162 | int nchans = buf.nchannels(); |
| 163 | float *pixel = ALLOCA (float, nchans); |
| 164 | buf.interppixel (x, y, pixel, wrap); |
| 165 | PyObject *result = PyTuple_New (nchans); |
| 166 | for (int i = 0; i < nchans; ++i) |
| 167 | PyTuple_SetItem (result, i, PyFloat_FromDouble(pixel[i])); |
| 168 | return object(handle<>(result)); |
| 169 | } |
| 170 | |
| 171 | BOOST_PYTHON_FUNCTION_OVERLOADS(ImageBuf_interppixel_overloads, |
| 172 | ImageBuf_interppixel, 3, 4) |
nothing calls this directly
no test coverage detected