diff --git a/src/conversion.cpp b/src/conversion.cpp index 5d6f46f..797e93a 100644 --- a/src/conversion.cpp +++ b/src/conversion.cpp @@ -16,7 +16,7 @@ void ofxMsdfgen::toOfImage(const msdfgen::Bitmap bitmap, int h = bitmap.height(); for(int y = 0; y < h; y++){ for(int x = 0; x < w; x++){ - const float * rgb = bitmap(x, y); + const auto & rgb = bitmap(x, y); int index = 3 * (x + y * w); pixels.getData()[index] = (unsigned char)std::clamp(rgb[0] * 256.0, 0.0, 255.0); @@ -47,7 +47,7 @@ ofImage ofxMsdfgen::toOfImage(const msdfgen::Bitmap bitmap){ int h = bitmap.height(); for(int y = 0; y < h; y++){ for(int x = 0; x < w; x++){ - const float * rgb = bitmap(x, y); + const auto & rgb = bitmap(x, y); int index = 3 * (x + y * w); pixels.getData()[index] = (unsigned char)std::clamp(rgb[0] * 256.0, 0.0, 255.0);