Skip to content
Myr

use simple memcpy if png filter=0

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by jarnoh · committed by jarnoh · parent 7a02732 · Browse files · 1 file+8 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−0 removed

  • other:+8 added−0 removed

1 file+8 added−0 removed

modified:stb_image_write.h+8 added
996 unmodified lines
997 int i;998 int type = mymap[filter_type];999 unsigned char *z = pixels + stride_bytes * (stbi__flip_vertically_on_write ? height-1-y : y);1000 int signed_stride = stbi__flip_vertically_on_write ? -stride_bytes : stride_bytes;1001 1002 // sorry for not optimizing the other paths1003 if(type==0)1004 {1005 memcpy(line_buffer, z, width*n);1006 return;1007 }1008 1009 for (i = 0; i < n; ++i) {1010 switch (type) {1011 case 0: line_buffer[i] = z[i]; break;1012 case 1: line_buffer[i] = z[i]; break;
568 unmodified lines