MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenImageIO / ImageBuf_interppixel

Function ImageBuf_interppixel

src/python/py_imagebuf.cpp:158–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156
157
158object
159ImageBuf_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
171BOOST_PYTHON_FUNCTION_OVERLOADS(ImageBuf_interppixel_overloads,
172 ImageBuf_interppixel, 3, 4)

Callers

nothing calls this directly

Calls 2

interppixelMethod · 0.80
nchannelsMethod · 0.45

Tested by

no test coverage detected