Skip to content
Myr

Merge branch 'stbiw-fix-jpeg-flipping' of https://github.com/DanielGibson/stb into working

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

authored by Sean Barrett · committed by Sean Barrett · parents 09998eb, 1ad30e4 · Browse files · 1 file+8 added−6 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−6 removed

  • other:+8 added−6 removed

1 file+8 added−6 removed

modified:stb_image_write.h+8 added-6 removed
1468 unmodified lines
1469 for(x = 0; x < width; x += 8) {1470 float YDU[64], UDU[64], VDU[64];1471 for(row = y, pos = 0; row < y+8; ++row) {1472 for(col = x; col < x+8; ++col, ++pos) {1473 int p = (stbi__flip_vertically_on_write ? height-1-row : row)*width*comp + col*comp;1473 float r, g, b;1475 if(row >= height) {1476 p -= width*comp*(row+1 - height);1474 int p;1475 if(row < height) {1476 p = (stbi__flip_vertically_on_write ? (height-1-row) : row)*width*comp;1477 } else {1478 // row >= height => use last input row (=> first if flipping)1479 p = stbi__flip_vertically_on_write ? 0 : ((height-1)*width*comp);1480 }1478 if(col >= width) {1479 p -= comp*(col+1 - width);1480 }1481 // if col >= width => use pixel from last input column1482 p += ((col < width) ? col : (width-1))*comp;14831484 r = imageData[p+0];1485 g = imageData[p+ofsG];1486 b = imageData[p+ofsB];
130 unmodified lines