25 float *pix = rect_float + i_range.
first() * 4;
26 for ([[maybe_unused]]
const int i : i_range) {
27 const float mul = 1.0f - pix[3];
39 for ([[maybe_unused]]
const int i : i_range) {
43 else if (pix[3] == 0) {
44 pix[0] = backcol[0] * 255;
45 pix[1] = backcol[1] * 255;
46 pix[2] = backcol[2] * 255;
49 float alpha = pix[3] / 255.0;
50 float mul = 1.0f - alpha;
52 pix[0] = (pix[0] * alpha) + mul * backcol[0];
53 pix[1] = (pix[1] * alpha) + mul * backcol[1];
54 pix[2] = (pix[2] * alpha) + mul * backcol[2];
constexpr int64_t first() const
constexpr IndexRange()=default
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
void IMB_alpha_under_color_byte(unsigned char *rect, int x, int y, const float backcol[3])
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
void IMB_alpha_under_color_float(float *rect_float, int x, int y, float backcol[3])