flip after all TODO: fix?
This commit is contained in:
parent
a0af51fdb4
commit
c3c58b422b
1 changed files with 4 additions and 3 deletions
|
@ -13,9 +13,10 @@ void ofxMsdfgen::toOfImage(const msdfgen::Bitmap <float, 3> bitmap,
|
|||
ofPixels & pixels = image.getPixels();
|
||||
int w = bitmap.width();
|
||||
int h = bitmap.height();
|
||||
for(int y = 0; y < h; ++y){
|
||||
for(int x = 0; x < w; ++x){
|
||||
const float * rgb = bitmap(x, y);
|
||||
// TODO: why do we need to flip?
|
||||
for(int y = 1; y <= h; y++){
|
||||
for(int x = 0; x < w; x++){
|
||||
const float * rgb = bitmap(x, h - y);
|
||||
int index = 3 * (x + y * w);
|
||||
pixels.getData()[index] = (unsigned char)std::clamp(rgb[0] * 256.0,
|
||||
0.0, 255.0);
|
||||
|
|
Loading…
Reference in a new issue