18 #if defined(_MSC_VER) && _MSC_VER < 1600
19 typedef __int64 int64_t;
21 # ifndef __STDC_LIMIT_MACROS
22 # define __STDC_LIMIT_MACROS
25 # if !defined(INT64_MIN)
26 # error You must define __STDC_LIMIT_MACROS prior to including stdint.h
61 init(copy.m_data, copy.m_nchannels, copy.m_width, copy.m_height,
62 copy.m_depth, copy.m_chanstride, copy.m_xstride, copy.m_ystride,
80 init(copy.m_data, copy.m_nchannels, copy.m_width, copy.m_height,
81 copy.m_depth, copy.m_chanstride, copy.m_xstride, copy.m_ystride,
97 int width()
const {
return m_width; }
98 int height()
const {
return m_height; }
99 int depth()
const {
return m_depth; }
106 const T*
data()
const {
return m_data; }
112 int m_nchannels, m_width, m_height, m_depth;
113 stride_t m_chanstride, m_xstride, m_ystride, m_zstride;
126 : m_nchannels * m_chanstride;
131 inline T* getptr(
int c,
int x,
int y,
int z = 0)
const
133 return (
T*)((
char*)m_data + c * m_chanstride + x * m_xstride
134 + y * m_ystride +
z * m_zstride);
136 inline T&
get(
int c,
int x,
int y,
int z = 0)
const
138 return *getptr(c, x, y,
z);
static const stride_t AutoStride
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
image_view & operator=(const image_view ©)
GLdouble GLdouble GLdouble z
image_view(T *data, int nchannels, int width, int height, int depth=1, stride_t chanstride=AutoStride, stride_t xstride=AutoStride, stride_t ystride=AutoStride, stride_t zstride=AutoStride)
image_view()
Default ctr – points to nothing.
GLint GLsizei GLsizei height
strided_ptr< T, 1 > operator()(int x, int y, int z=0)
const T & const_reference
stride_t chanstride() const
GLint GLint GLsizei GLsizei GLsizei depth
image_view(const image_view ©)
Copy constructor.
#define OIIO_NAMESPACE_END
#define OIIO_NAMESPACE_BEGIN