diff --git a/libs/openFrameworks/graphics/ofPixels.h b/libs/openFrameworks/graphics/ofPixels.h index b1121dd1411..90d8239a1c0 100644 --- a/libs/openFrameworks/graphics/ofPixels.h +++ b/libs/openFrameworks/graphics/ofPixels.h @@ -4,6 +4,7 @@ #include "ofUtils.h" #include "ofColor.h" #include "ofLog.h" +#include "ofMath.h" #include @@ -706,7 +707,7 @@ void ofPixels_::copyFrom(const ofPixels_ & mom){ if(sizeof(SrcType) == sizeof(float)) { // coming from float we need a special case to clamp the values for(size_t i = 0; i < mom.size(); i++){ - pixels[i] = CLAMP(mom[i], 0, 1) * factor; + pixels[i] = ofClamp(mom[i], 0, 1) * factor; } } else{ // everything else is a straight scaling