MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / stbiw__write_pixels

Function stbiw__write_pixels

include/stb_image_write.h:322–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320}
321
322static void stbiw__write_pixels(stbi__write_context *s, int rgb_dir, int vdir, int x, int y, int comp, void *data, int write_alpha, int scanline_pad, int expand_mono)
323{
324 stbiw_uint32 zero = 0;
325 int i,j, j_end;
326
327 if (y <= 0)
328 return;
329
330 if (vdir < 0)
331 j_end = -1, j = y-1;
332 else
333 j_end = y, j = 0;
334
335 for (; j != j_end; j += vdir) {
336 for (i=0; i < x; ++i) {
337 unsigned char *d = (unsigned char *) data + (j*x+i)*comp;
338 stbiw__write_pixel(s, rgb_dir, comp, write_alpha, expand_mono, d);
339 }
340 s->func(s->context, &zero, scanline_pad);
341 }
342}
343
344static int stbiw__outfile(stbi__write_context *s, int rgb_dir, int vdir, int x, int y, int comp, int expand_mono, void *data, int alpha, int pad, const char *fmt, ...)
345{

Callers 1

stbiw__outfileFunction · 0.85

Calls 1

stbiw__write_pixelFunction · 0.85

Tested by

no test coverage detected