Do the multiply inline, it should be a tad faster and not corrupt our data.

This commit is contained in:
Jorge Rodriguez
2014-07-31 19:00:48 -07:00
parent 13acfca829
commit d75488b0e8
2 changed files with 36 additions and 31 deletions

View File

@ -295,8 +295,8 @@ void test_premul(const char* file)
stbi_write_png("test-output/premul-original.png", w, h, n, input_data, 0);
int new_w = (int)(w * .5);
int new_h = (int)(h * .5);
int new_w = (int)(w * .1);
int new_h = (int)(h * .1);
unsigned char* output_data = (unsigned char*)malloc(new_w * new_h * n * sizeof(unsigned char));