17 #ifndef __IMG_Raster__
18 #define __IMG_Raster__
60 void setAlpha(
float alpha);
65 { (*compositebit_8_8)(dest, op, 1); }
68 { (*compositebit_8_16)(dest, op, 1); }
71 { (*compositebit_16_16)(dest, op, 1); }
74 { (*compositebit_16_8)(dest, op, 1); }
90 void size(
short w,
short h,
void *newRaster = 0);
91 void crop(
short x,
short y,
short w,
short h);
92 void rgbaScale(
float rrange[2],
96 short x=0,
short y=0,
short w=0,
short h=0);
102 void setChannelMask(
int r,
int g,
int b,
int a);
103 void setEdgeChannel(
IMG_Channel chan,
unsigned options = 0);
104 void setChromaKey(
const UT_HSVA c1,
111 virtual UT_RGBA *getPixel(
short x,
short y)
const;
113 virtual void *getVoidPixel(
short x,
short y)
const;
120 float filter_width = 0.0F)
122 resizeCopy(src, w, h, filt, filter_width,
130 short sw,
short sh,
short w,
short h);
132 int save(
const char *pathname,
bool quiet =
false);
133 int save(
const char *pathname,
int fullHeight,
void *tag,
135 unsigned margin = 0);
136 int save(std::ostream &os,
int binary = 1)
const;
138 void *openSave(
const char *pathname,
int fullHeight);
139 void *saveMore(
void *
handle);
140 void abortSave(
void *
handle);
142 int load(
const char *pathname,
146 bool watermarked =
false,
147 bool topremult =
true);
148 int load(
const char *pathname,
160 int stat(
const char *pathname,
164 void setClipOffset(
short x,
short y);
165 void setClipSize (
short w,
short h);
170 void getClippedOp(
short *
x,
short *
y,
short *
w,
short *
h)
const;
172 static void mult_8_8(
UT_RGBA *pixel,
unsigned int alpha,
173 unsigned int *
a,
unsigned int *
b,
174 unsigned int *
g,
unsigned int *r);
175 static void mult_8_16(
UT_RGBA *pixel,
unsigned int alpha,
176 unsigned int *
a,
unsigned int *
b,
177 unsigned int *
g,
unsigned int *r,
178 unsigned int point_five);
179 static void mult_16_8(
UT_BIG_RGBA *pixel,
unsigned int alpha,
180 unsigned int *
a,
unsigned int *
b,
181 unsigned int *
g,
unsigned int *r,
182 unsigned int point_five);
183 static void mult_16_16(
UT_BIG_RGBA *pixel,
unsigned int alpha,
184 unsigned int *
a,
unsigned int *
b,
185 unsigned int *
g,
unsigned int *r);
191 void blurOp_8 (
float weight = 0.5);
192 void blurOp_16(
float weight = 0.5);
193 void bumpOp_8 (
float weight = 0.5);
194 void bumpOp_16(
float weight = 0.5);
195 void edgeOp_8 (
float weight = 0.5);
196 void edgeOp_16(
float weight = 0.5);
197 void sharpenOp_8 (
float weight = 0.5);
198 void sharpenOp_16(
float weight = 0.5);
200 static unsigned short ut_chanR_8(
UT_RGBA *p);
201 static unsigned short ut_chanG_8(
UT_RGBA *p);
202 static unsigned short ut_chanB_8(
UT_RGBA *p);
203 static unsigned short ut_chanA_8(
UT_RGBA *p);
204 static unsigned short ut_chanL_8(
UT_RGBA *p);
205 static unsigned short ut_chanH_8(
UT_RGBA *p);
206 static unsigned short ut_chanS_8(
UT_RGBA *p);
207 static unsigned short ut_chanV_8(
UT_RGBA *p);
223 static void *compositeThreadMgr(
void *
data );
252 typedef void (*img_3SumFunc_8)(
257 typedef void (*img_3SumFunc_16)(
263 typedef void (*img_3x3FilterFunc_8)(
266 typedef void (*img_3x3FilterFunc_16)(
270 typedef void (*img_HpassFunc_8)(
271 img_3x3FilterFunc_8 do_pixel,
272 img_3SumFunc_8 do_sum,
278 typedef void (*img_HpassFunc_16)(
279 img_3x3FilterFunc_16 do_pixel,
280 img_3SumFunc_16 do_sum,
288 void apply3x3_8(img_HpassFunc_8 hpass,
289 img_3x3FilterFunc_8 doit,
290 img_3SumFunc_8 do_sum,
292 void apply3x3_16(img_HpassFunc_16 hpass,
293 img_3x3FilterFunc_16 doit,
294 img_3SumFunc_16 do_sum,
299 static void *doVerticalPass_8 (
void* );
300 static void *doVerticalPass_16(
void* );
301 static void *doHorizontalPass_8 (
void* );
302 static void *doHorizontalPass_16(
void* );
303 void initBlurTables_8 (
float weight);
304 void initBlurTables_16(
float weight);
306 void clearOutsideOpArea_8();
307 void clearOutsideOpArea_16();
309 void rgbaScale_8(
float rrange[2],
313 short x=0,
short y=0,
short w=0,
short h=0);
315 void rgbaScale_16(
float rrange[2],
319 short x=0,
short y=0,
short w=0,
short h=0);
324 copy(src, w, h, dst, dst_depth,
325 filt, 0.0F, filt, 0.0F);
328 void *
dst, UT_RasterDepth dst_depth,
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
const GLuint GLenum const void * binary
IMG_Compositebit_16_8 compositebit_16_8
GLboolean GLboolean GLboolean GLboolean a
GLuint GLsizei GLsizei * length
GLenum GLenum GLsizei void * image
void compositePixel(UT_BIG_RGBA *dest, UT_RGBA *op)
void compositePixel(UT_BIG_RGBA *dest, UT_BIG_RGBA *op)
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
void(* IMG_Compositebit_16_16)(UT_BIG_RGBA *dest, UT_BIG_RGBA *op, int len)
IMG_Compositebit_8_8 compositebit_8_8
GLfloat GLfloat GLfloat alpha
void compositePixel(UT_RGBA *dest, UT_BIG_RGBA *op)
GLboolean GLboolean GLboolean b
GLint GLint GLsizei GLsizei GLsizei depth
IMG_CompositeOp compositeOp
GLfloat GLfloat GLfloat GLfloat h
IMG_Compositebit_16_16 compositebit_16_16
ImageBuf OIIO_API resize(const ImageBuf &src, string_view filtername="", float filterwidth=0.0f, ROI roi={}, int nthreads=0)
void resizeCopy(IMG_Raster *src, short w, short h, UT_FilterType filt=UT_FILTER_POINT, float filter_width=0.0F)
void compositePixel(UT_RGBA *dest, UT_RGBA *op)
IMG_CompositeOp getCompositeOp() const
LeafData & operator=(const LeafData &)=delete
IMG_Compositebit_8_16 compositebit_8_16
GLubyte GLubyte GLubyte GLubyte w
void(* IMG_Compositebit_16_8)(UT_BIG_RGBA *dest, UT_RGBA *op, int len)
void(* IMG_Compositebit_8_8)(UT_RGBA *dest, UT_RGBA *op, int len)
ImageBuf OIIO_API crop(const ImageBuf &src, ROI roi={}, int nthreads=0)
void(* IMG_Compositebit_8_16)(UT_RGBA *dest, UT_BIG_RGBA *op, int len)
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter